Terragrunt and terraform template for GCP
- Terraform: version ~> v1.2.0
- Terragrunt: version ~> v0.37.1
- Google Cloud SDK: version ~> 384.0.1
- Edit $HOME/.terraformrc:
mkdir -p $HOME/.terraform.d/plugins
tee $HOME/.terraformrc <<-EOF
plugin_cache_dir = "\$HOME/.terraform.d/plugins"
disable_checkpoint = true
EOF
alias tg='terragrunt'
alias tgh='tg hclfmt'
alias tga='tgh && tg apply'
alias tgp='tgh && tg plan'
gcloud auth application-default login
(cd common/global/project-services && tg apply)
## Test env:
export ENV=test
## Staging env:
export ENV=stage
## Production env:
export ENV=prod
(cd env/us-east1/<resource-dir> && tg apply)