This is the base Terraform configuration to be used for the broad-redirect-* projects. This project also uses Terragrunt to make this configuration work for multiple projects that have the same configurations.
If you need to run Terraform for an environment locally, you first need to deal with Terraform state, which will be stored in a Google bucket (GCS).
Included in this repository is the run.sh script. This script can be used to run the alpine/terragrunt Docker container with all the correct parameters to run Terraform or Terragrunt correctly.
To run terraform, you will be running it as yourself in GCP. To accomplish this, you will need to activate Application Default Credentials on your local gcloud installation. More information can be found at https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login
To run Terragrunt, you should be in the Terragrunt container started using the run.sh script:
./run.sh bashFrom there, you should change to the directory of the environment you want to Terraform. For example, to push out changes to the dev environment:
cd dev
terragrunt plan --out=planfile
terragrunt apply planfile