Have you wondered what is the best workflow to use open-source Terraform at scale? In this blog post, I'll walk you through my favorite workflow using GitHub Actions. I'll deploy to Azure, but the same workflow can be adapted with other cloud provide...

Markdown supported · ⌘↵ to post
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
Senior DevOps Platform Engineer
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.