Skip to content

pingbui/terragrunt-gcp-example

Repository files navigation

Terragrunt/Terraform

Terragrunt and terraform template for GCP

Requirements:

  1. Terraform: version ~> v1.2.0
  2. Terragrunt: version ~> v0.37.1
  3. Google Cloud SDK: version ~> 384.0.1
  4. 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:

alias tg='terragrunt'
alias tgh='tg hclfmt'
alias tga='tgh && tg apply'
alias tgp='tgh && tg plan'

Steps to provision:

Set default login:

gcloud auth application-default login

Active services' API:

(cd common/global/project-services && tg apply)

Set environment from ENV before provisoning env's resources (Default is 'dev'):

## Test env:
export ENV=test

## Staging env:
export ENV=stage

## Production env:
export ENV=prod

Env's resources:

(cd env/us-east1/<resource-dir> && tg apply)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published