Destroy specific resource terraform
Destroy a single resource without full plan
terraform destroy -target='aws_instance.web' -auto-approve
more terraform
all 43 commands →
Unlock stuck state
terraform force-unlock <lock-id>
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'