Unlock stuck state terraform
Release a stuck state lock after a failed apply
terraform force-unlock <lock-id>
more terraform
all 43 commands →
Workspace create and switch
terraform workspace new staging && terraform workspace select staging
Show dependency graph
terraform graph | dot -Tsvg > graph.svg && open graph.svg
List providers with versions
terraform providers lock -platform=linux_amd64 -platform=darwin_arm64
Move resource in state
terraform state mv 'aws_instance.web' 'aws_instance.app'
Remove orphan from state
terraform state rm 'aws_s3_bucket.legacy'