Interview Prep/Terraform/Refactoring, Migration and Drift

What is your checklist before touching state manually?

IntermediateProductionRefactoring, Migration and Drift
Answer

Announce a freeze on the stack, take a backup (terraform state pull > backup.tfstate) and confirm bucket versioning, take the lock (no one else applying), make the smallest change with state mv/rm/import rather than editing JSON, run terraform plan to verify, and record the commands in the ticket.

All Terraform questions Roadmap: Terraform in production

More on Refactoring, Migration and Drift