Senior DevOps Platform Engineer
Thank you for a good article! The PR comment can be made easier:
- name: Terraform Plan
id: plan
run: |
terraform plan -refresh=false -no-color -out out.plan
- name: Comment PR
if: github.event_name == 'pull_request'
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
body: ${{steps.plan.outputs.stdout}}
Hi Facundo,
Ty for your article. I'm currently testing GitHub actions with terraform.
How would you handle it, if terraform apply fails after the pr is merged?
Best regards Tobi
Rishav Dhar
Hi Facundo, thanks for sharing this extensive write-up. It led me to explore the value GitHub Actions within CI/CD workflows to run Terraform from pull request comments: similar to Atlantis, but without the overhead of self-hosting.
I've open-sourced this reusable workflow and tried my best documenting its usage examples. Let me know if you happen to have any feedback.