release/terraform/cloudbuild.yaml (12 lines of code) (raw):
steps:
- id: 'tf init and apply'
name: 'hashicorp/terraform:latest'
env:
- 'TF_VAR_project=$PROJECT_ID'
entrypoint: 'sh'
dir: 'release/terraform'
args:
- '-c'
- |
terraform init --backend-config="bucket=${PROJECT_ID}-tfstate" -reconfigure
terraform apply -auto-approve