From fb089c4c831d68b42fbec5faa70d18272af66136 Mon Sep 17 00:00:00 2001 From: Jerome Dassonville Date: Wed, 20 Mar 2024 16:08:18 +0100 Subject: [PATCH] fix: extra_args not expanded properly --- .github/workflows/ecs-deploy-v2.yml | 4 +++- .github/workflows/terraform-apply-v2.yml | 4 +++- .github/workflows/terraform-plan-ecs-v2.yml | 4 +++- .github/workflows/terraform-plan-v2.yml | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ecs-deploy-v2.yml b/.github/workflows/ecs-deploy-v2.yml index ce1bd37..5ecc5e0 100644 --- a/.github/workflows/ecs-deploy-v2.yml +++ b/.github/workflows/ecs-deploy-v2.yml @@ -108,7 +108,9 @@ jobs: slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }} - name: Terraform apply - run: terraform apply -var "docker_image_tag=${DOCKER_IMAGE_TAG}" -var-file="${ENV}.tfvars" -auto-approve -input=false "${EXTRA_ARGS}" + run: | + # shellcheck disable=SC2086 + terraform apply -var "docker_image_tag=${DOCKER_IMAGE_TAG}" -var-file="${ENV}.tfvars" -auto-approve -input=false ${EXTRA_ARGS} - name: Wait for stabilization if: ${{ inputs.wait_for_stabilization }} diff --git a/.github/workflows/terraform-apply-v2.yml b/.github/workflows/terraform-apply-v2.yml index 6cc336f..7946aa9 100644 --- a/.github/workflows/terraform-apply-v2.yml +++ b/.github/workflows/terraform-apply-v2.yml @@ -71,4 +71,6 @@ jobs: run: terraform validate - name: Terraform apply - run: terraform apply -var-file="${ENV}.tfvars" -auto-approve -input=false "${EXTRA_ARGS}" + run: | + # shellcheck disable=SC2086 + terraform apply -var-file="${ENV}.tfvars" -auto-approve -input=false ${EXTRA_ARGS} diff --git a/.github/workflows/terraform-plan-ecs-v2.yml b/.github/workflows/terraform-plan-ecs-v2.yml index 2921402..40ad563 100644 --- a/.github/workflows/terraform-plan-ecs-v2.yml +++ b/.github/workflows/terraform-plan-ecs-v2.yml @@ -93,7 +93,9 @@ jobs: # inspired by https://blog.testdouble.com/posts/2021-12-07-elevate-your-terraform-workflow-with-github-actions/ - name: Terraform plan id: plan - run: terraform plan -var docker_image_tag="${REF}" -var-file="${ENV}.tfvars" -input=false -no-color -out=tfplan "${EXTRA_ARGS}" + run: | + # shellcheck disable=SC2086 + terraform plan -var docker_image_tag="${REF}" -var-file="${ENV}.tfvars" -input=false -no-color -out=tfplan ${EXTRA_ARGS} # 1. remove everything before the plan output # 2. remove github actions output diff --git a/.github/workflows/terraform-plan-v2.yml b/.github/workflows/terraform-plan-v2.yml index 76f2ae7..e5cec75 100644 --- a/.github/workflows/terraform-plan-v2.yml +++ b/.github/workflows/terraform-plan-v2.yml @@ -79,7 +79,9 @@ jobs: # inspired by https://blog.testdouble.com/posts/2021-12-07-elevate-your-terraform-workflow-with-github-actions/ - name: Terraform plan id: plan - run: terraform plan -var-file="${ENV}.tfvars" -input=false -no-color -out=tfplan "${EXTRA_ARGS}" + run: | + # shellcheck disable=SC2086 + terraform plan -var-file="${ENV}.tfvars" -input=false -no-color -out=tfplan ${EXTRA_ARGS} # 1. remove everything before the plan output # 2. remove github actions output