Slackbot
01/05/2024, 9:15 PMPePe Amengual
01/07/2024, 5:35 PMJason Reslock
01/08/2024, 2:08 PMinit plan and apply operations. I would like to avoid shelling out to raw terraform commands because it seems to be causing some trouble with locking.PePe Amengual
01/08/2024, 2:09 PMJason Reslock
01/08/2024, 2:11 PMPePe Amengual
01/08/2024, 2:12 PMPePe Amengual
01/08/2024, 2:12 PMJason Reslock
01/08/2024, 2:16 PMworkflows:
dev:
plan:
steps:
- init
- run: if [ "$BASE_BRANCH_NAME" = "develop" ]; then terraform plan -var-file=environment.tfvars -out=./tfplan; else echo "Skipping plan for this branch"; fi
apply:
steps:
- run: if [ "$BASE_BRANCH_NAME" = "develop" ]; then terraform apply -auto-approve ./tfplan; else echo "Skipping apply for this branch"; fi
production_workflow:
plan:
steps:
- init
- run: if [ "$BASE_BRANCH_NAME" = "main" ]; then terraform plan -var-file=environment.tfvars -out=./tfplan; else echo "Skipping plan for this branch"; fi
apply:
steps:
- run: if [ "$BASE_BRANCH_NAME" = "main" ]; then terraform apply -auto-approve ./tfplan; else echo "Skipping apply for this branch"; fiJason Reslock
01/08/2024, 2:17 PMinit or plan command?PePe Amengual
01/08/2024, 2:18 PMJason Reslock
01/08/2024, 2:19 PMPePe Amengual
01/08/2024, 2:21 PMPePe Amengual
01/08/2024, 2:21 PMJason Reslock
01/08/2024, 2:21 PMJason Reslock
01/08/2024, 2:40 PMJason Reslock
01/08/2024, 10:42 PMPePe Amengual
01/09/2024, 2:00 AM