From 1c67eafff3c0042d025fabd8e4c8467c58861f7a Mon Sep 17 00:00:00 2001 From: Mike Schenk Date: Mon, 1 Apr 2024 15:50:57 -0600 Subject: [PATCH 1/2] Updates the Terraform auto-plan workflow - adds -input=false to the terraform commands to avoid silent stalls in actions runs - updates action versions to fix node version deprecation warnings --- .../im-build-tf-auto-plan-and-comment-on-prs.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/workflow-templates/im-build-tf-auto-plan-and-comment-on-prs.yml b/workflow-templates/im-build-tf-auto-plan-and-comment-on-prs.yml index fa842f99..77dae9f4 100644 --- a/workflow-templates/im-build-tf-auto-plan-and-comment-on-prs.yml +++ b/workflow-templates/im-build-tf-auto-plan-and-comment-on-prs.yml @@ -1,4 +1,4 @@ -# Workflow Code: DeterminedPorcupine_v22 DO NOT REMOVE +# Workflow Code: DeterminedPorcupine_v23 DO NOT REMOVE # Purpose: # Automatically runs a terraform plan against the specified environments and # comments on the PR with the expected changes when commits are pushed to a PR. @@ -65,11 +65,11 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Terraform id: setup - uses: hashicorp/setup-terraform@v2.0.3 + uses: hashicorp/setup-terraform@v3 with: terraform_version: '${{ env.TF_VERSION }}' @@ -82,7 +82,7 @@ jobs: - name: Terraform Init if: always() id: init - run: terraform init + run: terraform init -input=false - name: Terraform Format if: always() @@ -97,12 +97,12 @@ jobs: if: always() id: plan run: | - terraform plan -no-color -lock=false \ + terraform plan -no-color -lock=false -input=false \ -var="pagerduty_token=${{ secrets.PAGERDUTY_API_KEY }}" - name: 'Terraform Comment' if: always() - uses: actions/github-script@v6 + uses: actions/github-script@v7 env: PLAN: "\n```\n${{ steps.plan.outputs.stdout }}\n```\n" with: From 4933be5c923fcc63490d97111dcc5c42ca818dab Mon Sep 17 00:00:00 2001 From: Joseph Schwartz Date: Tue, 2 Apr 2024 07:22:24 -0600 Subject: [PATCH 2/2] Update workflow version --- workflow-templates/im-build-tf-auto-plan-and-comment-on-prs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow-templates/im-build-tf-auto-plan-and-comment-on-prs.yml b/workflow-templates/im-build-tf-auto-plan-and-comment-on-prs.yml index 77dae9f4..b6a1f1bd 100644 --- a/workflow-templates/im-build-tf-auto-plan-and-comment-on-prs.yml +++ b/workflow-templates/im-build-tf-auto-plan-and-comment-on-prs.yml @@ -1,4 +1,4 @@ -# Workflow Code: DeterminedPorcupine_v23 DO NOT REMOVE +# Workflow Code: DeterminedPorcupine_v24 DO NOT REMOVE # Purpose: # Automatically runs a terraform plan against the specified environments and # comments on the PR with the expected changes when commits are pushed to a PR.