“Writing” IaC with Terraform is the easy part; operating it is the hard part. State gets corrupted, drift grows, and without review IaC turns into something the team learns to fear. The cause is rarely Terraform itself; it’s the operating model around it.
In this post I describe the practical framework I rely on: remote state, locking, module boundaries, plan/review discipline, and drift control.
1) State: the most critical asset
Minimum standards:
- Remote backend
- Locking enabled
- Least-privilege state access
- Audit and backup
2) Plan/Apply: the right to change is a policy decision
A safe model:
planruns in the PR- Approval comes through review
applyruns after the merge
Just like with build artefacts, you make every infrastructure change something that has been formally “reviewed.”
3) Drift: the real test of IaC
To reduce drift:
- restrict manual changes (use break-glass instead)
- run a scheduled plan (drift check)
- add guardrails (
prevent_destroy, etc.)
Conclusion
Terraform success comes from remote state, plan/review, and drift control. Without that triad, IaC simply isn’t sustainable.