- Create branch from master.
- Put tf files.
- Create pull-request to master
- Terraform Cloud run "terraform plan" (dry-run)
- Merge pull-request
- Terraform Cloud run "terraform apply" (deploy)
- Get "terraform.tfvars" and "terraform.tfstate" from Terraform Cloud and Put files
- Exec following command
docker run -it -v $PWD:/app -w /app hashicorp/terraform init
docker run -it -v $PWD:/app -w /app hashicorp/terraform plan -var "GCP_CREDENTIALS=$(cat credentials.json)"
docker run -it -v $PWD:/app -w /app hashicorp/terraform apply -var "GCP_CREDENTIALS=$(cat credentials.json)"