Remove resource from state
Forget a resource from state without destroying it in cloud
terraform state rm module.path.resource_type.name
More terraform commands
-
terraform refresh -var-file=prod.tfvarsUpdate state file to match real infrastructure
-
terraform graph | dot -Tsvg > graph.svgVisualize resource dependency graph (requires Graphviz)
-
terraform state list | grep <pattern>Filter state resources by pattern
-
terraform fmt -recursiveRecursively format all .tf files in subdirectories
-
terraform validateCheck configuration syntax without accessing remote state