From 2c5cfa722714166f1ea8a51efe564fad7d7f2ace Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Thu, 15 Aug 2024 15:14:54 -0700 Subject: [PATCH 1/4] Update terraform_plan.yaml --- .github/workflows/terraform_plan.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index e8eb613..bde036d 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -66,16 +66,26 @@ jobs: id: validate run: terraform validate -no-color + - name: Terraform Plan + id: plan + if: github.event_name == 'pull_request' + run: terraform plan -no-color -out=${{ vars.plan_cache }}/${{ github.sha }} + continue-on-error: true + - name: Terraform Plan id: plan run: terraform plan -no-color continue-on-error: true + - name: Terraform Show plan + if: github.event_name == 'pull_request' + run: echo ::set-output name=terraform_plan::$(terraform show ${{ vars.plan_cache }}/${{ github.sha }}) + - name: Post Terraform Plan to PR uses: CSVD/gh-actions-github-script@v6 if: github.event_name == 'pull_request' env: - PLAN: "terraform\n${{ steps.plan.outputs.stdout }}" + PLAN: "terraform\n${{ env.terraform_plan }}" with: github-token: ${{ secrets.GH_TOKEN }} script: | From c7d9b4876454cff0b5038530d8f343a335ae3ea9 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Thu, 15 Aug 2024 15:15:59 -0700 Subject: [PATCH 2/4] Update terraform_plan.yaml --- .github/workflows/terraform_plan.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index bde036d..334219c 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -73,7 +73,6 @@ jobs: continue-on-error: true - name: Terraform Plan - id: plan run: terraform plan -no-color continue-on-error: true From 4a823afe72ba4d74faa27bd32337a902b61b79a0 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Thu, 15 Aug 2024 15:17:23 -0700 Subject: [PATCH 3/4] Update terraform_plan.yaml --- .github/workflows/terraform_plan.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index 334219c..50b6820 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -73,6 +73,7 @@ jobs: continue-on-error: true - name: Terraform Plan + if: github.event_name != 'pull_request' run: terraform plan -no-color continue-on-error: true From bc33078c03479958b0f1ee231df1b8f6c6950d80 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Thu, 15 Aug 2024 15:20:22 -0700 Subject: [PATCH 4/4] Update main.tf --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 9d31c8a..6c72d56 100644 --- a/main.tf +++ b/main.tf @@ -2,7 +2,7 @@ locals { collaborators = { naray007 = "push", morga471 = "push", - lolli001 = "pull", + lolli001 = "push", gomez385 = "push" } pull_request_bypassers = [