Emergency CheatsheetCODE: 010-TERRAFORM-IAC-RUNBOOK⏱️ ~5 min read
Terraform State Runbook: State Locks, Drift Detection, Refactoring & Import
Hands-on guide to resolving state lock errors, detecting infrastructure drift, safe resource renaming, and terraform import.
Authored by: Vibe DevOps · Published: 10/20/2026
Unlock stalled Terraform states, detect infrastructure drift, and safely import cloud resources without state corruption.
1. Force-Unlocking State
terraform force-unlock <LOCK_ID>
2. Drift Detection & State Import
terraform plan -refresh-only
terraform import <resource.type> <cloud-id>
💡 Team Storage & Usage Tips
Store the vector PDF in your internal team repository (Notion, Confluence) or print it out in A4 format next to your workstation for rapid troubleshooting during midnight production outages.