Terraform Graph Visualizer

Paste your Terraform configuration and see the dependency graph it implies — without running terraform graph or installing Graphviz. The tool parses your HCL, finds every resource, data source, module, and variable, detects the references between them, and draws the result as a diagram with foundational inputs on the left and dependent resources on the right. Everything is parsed in your browser; nothing is uploaded.

This is a static analysis of references in your HCL, not a terraform plan. It catches explicit dependencies (one resource referencing another's attribute) and the common depends_on form; it does not resolve for_each expansion, provider-implicit ordering, or cross-state data. Treat it as a readable map of how your config wires together.

How to use the Terraform Graph Visualizer

Paste one or more .tf files into the box — you can concatenate a whole module's files. The graph updates as you type. Each box is a node: resources and data sources are labelled type.name, modules as module.name, and input variables as var.name. An arrow from one node to another means the first depends on the second because it references one of its attributes, so the arrows point from consumers toward the inputs they rely on.

Read the layout left to right: variables, data sources, and other leaf inputs sit on the left, and the resources that build on them appear further right, roughly in the order Terraform would create them. The summary above the diagram counts each kind of block and lists the dependency edges in text, which is handy for spotting a resource that depends on far more than you expected, or an input that nothing actually uses. Use it to review a module's shape before applying, or to explain a configuration to someone else.

What the Terraform dependency graph represents

Terraform does not apply your resources in the order you wrote them. Instead it builds a dependency graph — a directed acyclic graph where each node is a resource, data source, or other object, and each edge records that one object needs another to exist first. Terraform then walks that graph, creating independent resources in parallel and waiting only where a real dependency exists. Understanding the graph is the key to understanding why a plan does what it does.

Most edges are implicit: whenever one resource references another's attribute — subnet_id = aws_subnet.public.id, say — Terraform infers that the instance depends on the subnet, with no extra declaration needed. References to var.*, data.*, module.*, and local.* create the same kind of edge. Occasionally you need an explicit edge for an ordering that is not expressed through data, which is what the depends_on argument is for. This tool detects both forms by scanning your HCL for references between the blocks you have declared.

Seeing the graph drawn out answers questions that are hard to read off raw configuration. It shows the true creation order, reveals when an innocuous-looking change will force a cascade of dependent resources to update, and surfaces structural smells — a single resource everything hangs off, an input variable nothing consumes, or an unexpectedly deep chain. The official terraform graph command emits this as Graphviz DOT, which then needs Graphviz to render; this visualizer does the parsing and drawing in one step in the browser, so you get the picture without the toolchain.

Common use cases

  • Code review. See how a module wires together before approving a change.
  • Onboarding. Give someone new a visual map of an unfamiliar Terraform configuration.
  • Debugging order. Understand why Terraform creates or destroys resources in a particular sequence.
  • Finding dead inputs. Spot variables or data sources that nothing references.

Frequently asked questions

Is this the same as terraform graph?

It shows the same kind of information — the dependency relationships between your objects — but it works differently. terraform graph builds the graph from initialised state and emits Graphviz DOT that you then render. This tool statically parses the HCL you paste and draws the graph directly in the browser, so you do not need terraform or Graphviz installed.

What dependencies does it detect?

Implicit dependencies, where one block references another's attribute (such as aws_subnet.public.id, var.region, data.aws_ami.ubuntu, or module.vpc.outputs), and explicit depends_on entries. It builds an edge from the referencing block to the one it references.

What does it not handle?

It does not run a plan, so it cannot resolve for_each or count expansion into individual instances, infer provider-level implicit ordering, or follow data that lives in remote state. Expressions are read as text, not evaluated. It is a structural map of references, not a substitute for terraform plan.

Which way do the arrows point?

From the dependent to its dependency — the same direction as "needs". If aws_instance.web references aws_subnet.public, the arrow runs from web to public, because the instance needs the subnet first. Foundational inputs therefore collect incoming arrows on the left.

Is my configuration uploaded anywhere?

No. All parsing and rendering happen locally in your browser with JavaScript; the HCL you paste never leaves your machine. You can use it on private infrastructure code without it being transmitted or stored.