The repo uses pre-commit (https://pre-commit.com/) to install and manage git
pre-commit hooks.
# newer modules, use latest tf (1.13.4+)
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
# for working with older modules, use tf 1.5.7
brew install terraform
# install dev dependencies
brew install pre-commit
brew install terraform-docs
# setup pre-commit
pre-commit installWe manage state per-module. This allows us to work with some isolation to avoid
conflicts with other people's changes and reduces the number of objects synced
during terraform apply.
cd terraform
./create_state.sh "descriptive_name_for_what_this_module_does"
Then follow the directions given.
## AWS
export AWS_ACCESS_KEY_ID=foo
export AWS_SECRET_ACCESS_KEY=bar
## GCP
export GOOGLE_CLOUD_KEYFILE_JSON=~/.config/gcloud/application_default_credentials.json
## Azure
$ az login
$ az account set --subscription "108d46d5-fe9b-4850-9a7d-8c914aa6c1f0" ## based on subscriptionProviders should be regularly upgraded. If you get an error during a plan or apply, always try this first.
terraform init -upgrade