Taint resource for recreation terraform
Mark resource to be destroyed and recreated on next apply
terraform taint 'aws_instance.web[0]'
more terraform
all 43 commands →
Remove resource from state
terraform state rm 'aws_instance.legacy'
Show outputs
terraform output -json | jq 'to_entries[] | {(.key): .value.value}'
Destroy specific resource
terraform destroy -target='aws_instance.web' -auto-approve
Unlock stuck state
terraform force-unlock <lock-id>
Workspace create and switch
terraform workspace new staging && terraform workspace select staging