File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 - " .github/workflows/terraform-plan.yml"
99
1010permissions :
11- id-token : write
1211 contents : read
12+ id-token : write
13+ pull-requests : write
1314
1415jobs :
1516 terraform-plan :
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+ # tf-summarize generates a course-grained summary w/ no sensitive infra details
50+ - name : Setup tf-summarize
51+ uses : kishaningithub/setup-tf-summarize@1596bb06f9509eb36b71bc1b304407cc111059c0 # v3.0.0
52+
53+ - name : Create tf-summarize markdown file
54+ run : tf-summarize -md tfplan >> tf-summary.md
55+
56+ - name : Create PR comment with course-grained plan summary
57+ uses : peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
58+ with :
59+ issue-number : ${{ github.event.number }}
60+ body-path : " ./terraform/tf-summary.md"
You can’t perform that action at this time.
0 commit comments