Tools
Practical
By Samson Tanimawo, PhD
Published May 27, 2026
4 min read
Terraform Cheats for Debugging
Reading plan output, fixing state, recovering from broken applies. The terraform commands worth memorising.
Live workflow · 3 working · 1 queuedLive
Signal · gather Working
Decide · pick action Working
Apply · with verify Working
Learn · update playbook Queued
Reading plans
terraform plan -out=plan.tfplan saves the plan; terraform show plan.tfplan reads it.
Diff before apply; the surprise is in the diff.
State surgery
terraform state list shows resources; terraform state rm removes one without destroying.
Use when state drifts from reality and you need to re-import.
Import
terraform import addr id pulls existing resources into state.
Useful for recovering from manually-created resources.