What does `terraform graph` give you?
IntermediateConceptWorkflow and CLI
Answer
It prints the dependency graph in DOT format, rendered by Graphviz.
terraform graph | dot -Tsvg > graph.svg
terraform graph -type=plan-destroy
We use it to debug unexpected ordering or a Cycle error, though large graphs are unreadable without filtering.
More on Workflow and CLI
What does `terraform init` do?BeginnerWhat does `terraform plan` do?BeginnerWhat does `terraform apply` do and what is `-auto-approve`?BeginnerWhat does `terraform destroy` do?BeginnerWhat do `terraform fmt` and `terraform validate` check?BeginnerWhy save a plan with `-out` and apply that file?Intermediate