BM: Baca dalam Bahasa Melayu
World T4: Modules & Pipelines
A plan on every pull request
You will learn: how a small workflow plans every change on the pull request, so the team reviews it first.
Checked with OpenTofu 1.13 on 1 Nov 2026
The problem
Ben ran tofu apply from his laptop. Nobody saw the plan. It destroyed the old menu board. How could the team have caught it in time?
Pick one answer.
Watch
- Bben
One more kiosk from the kiosk module.
- plan-bot
Plan for this pull request:
# module.roti.local_file.sign will be created Plan: 1 to add, 0 to change, 0 to destroy.
- Passed tofu fmt
- Passed tofu validate
- Passed tofu plan
- This branch needs one approving review first.
Read the plan in the comment. Nothing to destroy? Then approve it.
Try it
Build the workflow that made those checks. Plan only: no apply here.
Tap blocks to add them. Put them in order.
Blocks
Your workflow
Tap a block above to start.
Workflow file .github/workflows/
name: Plan
What runs
Nothing to run yet.
Hint
Trigger, permissions, job, then the steps in the order you would type them.Predict
Ben forgot to run tofu fmt. His pull request runs this workflow. What happens?
Pick one answer.
Check
Where does each step belong?
Drag a card into a box. Or tap the card, then tap the box.
Check
Swipe: a good pipeline habit, or needs work?
Swipe right for good, left for needs work. Or use the buttons.
Plan on every pull request, apply after merge with an approval
You did it!
You can now plan every change on a pull request, for the team to review.
Go deeper (optional)
In CI the plan needs the shared backend (T3ยท1). Without it, the register looks empty. Posting the plan as a comment needs pull-requests: write and a small script. For apply after merge, save the plan with -out and apply exactly that file. Atlantis or HCP Terraform can run this loop for you. Mission 8 puts this workflow on your repo.
Bahasa Melayu
Ben jalankan tofu apply dari laptopnya. Tiada siapa nampak plan. Ia musnahkan papan menu lama. Bagaimana pasukan boleh tangkap lebih awal?
Baca plan dalam komen. Tiada apa untuk dimusnahkan? Kalau begitu, luluskan.
Bina workflow yang hasilkan semakan itu. Plan sahaja: tiada apply di sini.
Ben terlupa jalankan tofu fmt. Pull request-nya jalankan workflow ini. Apa jadi?
Di mana setiap langkah patut berlaku?
Leret: tabiat pipeline yang bagus, atau perlu dibaiki?
Kini anda boleh plan setiap perubahan dalam pull request, supaya pasukan semak dahulu.
You finished this before. Practice is always welcome!
Official docs: opentofu/setup-opentofu (GitHub Action) ยท OpenTofu: the core workflow ยท Terraform: running in automation ยท GitHub: protected branches
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?