The core project root
owns the environment projects to deploy the core logic to:
root
|- staging
`- production
- Service Account with the JSON key
- Export path to the key:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/json/key
- Navigate to the directory with the terraform instructions
cd gcp
- Switch environments:
staging
/production
:
terraform workspace select staging
terraform workspace select production
- Execute the tf commands:
terraform init
terraform plan
terraform apply -auto-approve