terraform-graph
Print a Terraform dependency graph in DOT format
TLDR
SYNOPSIS
terraform graph [options]
DESCRIPTION
terraform graph writes a dependency graph of the configuration, or of a selected operation, to standard output. The text is in the DOT language. The default graph shows only the order of resource and data blocks. -type selects a fuller graph for plan, plan-refresh-only, plan-destroy, or apply.The dot program from Graphviz turns that text into an image. Online DOT renderers accept the same text. The command does not change infrastructure or state.
PARAMETERS
-plan =tfplan
Graph the apply of a saved plan file. Implies -type=apply.-draw-cycles
Color edges that form a cycle. Valid only together with -type.-type =plan|plan-refresh-only|plan-destroy|apply
Draw the graph for that operation instead of the default resources-only graph. These graphs include more of the Terraform runtime and are harder to read.-var 'name=value'
Set one input variable declared in the root module. Repeat the flag to set more than one.-var-file filename
Load variable values from a .tfvars file. Repeat the flag to include more than one file.
INSTALL
CAVEATS
-draw-cycles is rejected unless -type selects an operation graph. The default simplified graph does not support it.-plan always implies -type=apply, even if another type is requested. The plan file has to be one terraform plan -out produced.The operation graphs expose implementation details of the Terraform runtime. They are diagnostic output, not a stable API.
HISTORY
Terraform was created by Mitchell Hashimoto at HashiCorp and first released in 2014.
SEE ALSO
terraform(1), terraform-plan(1), terraform-apply(1), dot(1)
