Cloud By System Administrator updated November 10, 2026 412 views

Terraform state: backends, locking and disaster recovery

S3 + DynamoDB locking, state surgery and why you should never edit state by hand.

Terraform state is the most dangerous file in your repository — treat it like a database.

Remote backends

S3 with versioning and DynamoDB state locking gives you collaboration and protection in one move.

Recovery

Enable bucket versioning before you need it. Practice terraform state pull/push in a staging workspace.

When things break

terraform state rm and targeted imports beat hand-editing JSON every time.

Tagged: Aws Terraform
System Administrator

DevOps Engineer — writing about infrastructure, automation and platform engineering.

More articles →