Unlock a stuck state
Release a stuck state lock after a failed apply
terraform force-unlock <lock-id>
- tool
- terraform43 commands
More terraform commands
-
terraform workspace new staging && terraform workspace select stagingCreate a new workspace and switch to it
-
terraform graph | dot -Tsvg > graph.svg && open graph.svgRender the resource dependency graph as SVG and open it (needs Graphviz)
-
terraform providers lock -platform=linux_amd64 -platform=darwin_arm64Lock provider versions for several platforms in .terraform.lock.hcl
-
terraform state mv 'aws_instance.web' 'aws_instance.app'Change a resource address without destroying it; in newer Terraform, use a moved{} block instead
-
terraform state rm 'aws_s3_bucket.legacy'Forget a resource in state without deleting the real infrastructure; the object keeps running