Skip to content

Commit c10ec89

Browse files
committed
chore: post terraform plan summary as PR comment
1 parent 7332b67 commit c10ec89

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/terraform-plan.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ on:
88
- ".github/workflows/terraform-plan.yml"
99

1010
permissions:
11-
id-token: write
1211
contents: read
12+
id-token: write
13+
pull-requests: write
1314

1415
jobs:
1516
terraform-plan:
@@ -43,4 +44,11 @@ jobs:
4344
TF_VAR_CONTAINER_TAG: ${{ github.sha }}
4445
TF_VAR_DEVSECOPS_OBJECT_ID: ${{ secrets.TF_VAR_DEVSECOPS_OBJECT_ID }}
4546
TF_VAR_ENGINEERING_GROUP_OBJECT_ID: ${{ secrets.TF_VAR_ENGINEERING_GROUP_OBJECT_ID }}
46-
run: terraform plan -lock-timeout=5m
47+
run: terraform plan -out=tfplan -lock-timeout=5m
48+
49+
- name: Summarize plan in PR comment
50+
uses: borchero/terraform-plan-comment@2d41e908725447b1677913001dfb92fa7010c025 # v3.1.0
51+
with:
52+
planfile: tfplan
53+
token: ${{ github.token }}
54+
working-directory: terraform

0 commit comments

Comments
 (0)