diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml
index 50b6820..74f6644 100644
--- a/.github/workflows/terraform_plan.yaml
+++ b/.github/workflows/terraform_plan.yaml
@@ -69,19 +69,19 @@ jobs:
- name: Terraform Plan
id: plan
if: github.event_name == 'pull_request'
- run: terraform plan -no-color -out=${{ vars.plan_cache }}/${{ github.sha }}
+ run: terraform plan -out=${{ vars.plan_cache }}/${{ github.sha }}
continue-on-error: true
- name: Terraform Plan
if: github.event_name != 'pull_request'
- run: terraform plan -no-color
+ run: terraform plan
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 }})
+ run: echo terraform_plan=$(terraform show -no-color ${{ vars.plan_cache }}/${{ github.sha }}) >> $GITHUB_ENV
- - name: Post Terraform Plan to PR
+ - name: Post Terraform Stats to PR
uses: CSVD/gh-actions-github-script@v6
if: github.event_name == 'pull_request'
env:
@@ -89,29 +89,21 @@ jobs:
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
+ const plan=${process.env.PLAN};
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\`
Validation Output
-
\`\`\`\n
${{ steps.validate.outputs.stdout }}
\`\`\`
-
-
+ #### Terraform Plan ID: \`${{ github.sha }}\`
#### Terraform Plan 📖\`${{ steps.plan.outcome }}\`
-
- Show Plan
-
- \`\`\`\n
- ${process.env.PLAN}
- \`\`\`
-
+ Plan
+ ${{ env.terraform_plan }}
-
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Workflow: \`${{ github.workflow }}\`*`;
-
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
diff --git a/main.tf b/main.tf
index 6c72d56..20c7dc1 100644
--- a/main.tf
+++ b/main.tf
@@ -1,7 +1,7 @@
locals {
collaborators = {
naray007 = "push",
- morga471 = "push",
+ morga471 = "pull",
lolli001 = "push",
gomez385 = "push"
}