---
title: "Discussion on \"How to unlock Terraform state (force-unlock) and recover it\" | Hashnode"
description: "Discussion on \"How to unlock Terraform state (force-unlock) and recover it\". Stuck on \"Error acquiring the state lock\"? Find the lock ID, check it is safe, run terraform force-unlock, and roll back a bad state from S3 versioning."
url: "https://hashnode.com/posts/how-to-unlock-terraform-state-force-unlock-and-recover-it/6af9f26ccefe97ccc7900609"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to unlock Terraform state (force-unlock) and recover it](https://devopswithumar.hashnode.dev/how-to-unlock-terraform-state-force-unlock-and-recover-it?utm_source=hashnode&utm_medium=feed)

Stuck on "Error acquiring the state lock"? Find the lock ID, check it is safe, run terraform force-unlock, and roll back a bad state from S3 versioning.

2d ago · 6 min read · devopswithumar.hashnode.dev  
Read the article

-   [#terraform](https://hashnode.com/tag/terraform)
-   [#devops](https://hashnode.com/tag/devops)
-   [#aws](https://hashnode.com/tag/aws)

## Written by

[Muhammad Umar](https://hashnode.com/@devopswithumar)

@devopswithumar

  
[View profile](https://hashnode.com/@devopswithumar)

Freelance DevOps engineer. AWS, Terraform, Kubernetes and CI/CD for startups.

Freelance DevOps engineer. I build secure, automated AWS infrastructure with Terraform, Kubernetes and GitHub Actions for startups. Guides and case studies at devopswithumar.com.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
