All Tools View Categories About Contact Privacy

Terraform Architecture Diagram Generator

Generate a provider-to-resource architecture diagram from your .tf.

Runs entirely in your browser - nothing is uploaded and no cloud connection is made.
0
lines
0
characters
Your architecture diagram will appear here.

About Terraform Architecture Diagram Generator

Understanding a Terraform project is far easier with a picture, but drawing architecture diagrams by hand is slow and goes stale the moment the code changes. A diagram generated from the configuration itself always reflects what is actually defined, showing resources, their types and the relationships between them. Teams use these diagrams for design reviews, handovers, audits and onboarding new engineers who need to see topology quickly without reading every single file in the repository by hand.

The Terraform Architecture Diagram Generator parses your .tf files and produces a diagram description you can render with a standard tool such as Mermaid or PlantUML. It extracts resource blocks, groups them by type, and draws edges for the references it can detect, such as a subnet attached to a VPC or an instance using a security group. The layout is text based, so it lives in version control next to the code and can be regenerated after every change. Parsing happens entirely in your browser, so your configuration is never uploaded and stays private on your machine at all times while you work.

Use it to visualise a module before a review, to document an existing estate, or to catch missing connections that a flat file list hides from reviewers and operators who must reason carefully about blast radius and failure modes.

Because the output is plain text, you can diff two versions of a diagram in code review and see exactly how the topology changed between pull requests. That makes architecture review a first-class, reviewable artefact instead of a separate document that drifts from the code it describes and is forgotten after the meeting ends.

Features

  • HCL parsing - reads resource blocks from pasted .tf files directly and fast.
  • Type grouping - resources clustered by their provider type for visual clarity.
  • Reference edges - draws relationships detected between resources automatically for you.
  • Multiple formats - emits Mermaid or PlantUML diagram source text you can render.
  • Subgraph support - groups resources into modules or namespaces visually in the output.
  • Legend - a key of resource types and colours for the reader of the diagram.
  • Clean output - skips comments and empty blocks from the source you pasted.
  • Copy or download - export the diagram source for your documentation set.
  • Live stats - counts of resources and connections in the preview for a quick check.
  • Private - parsing stays in the browser only, nothing is sent to a server.
  • Text based - diagrams live in git beside the code they describe and explain.
  • Review aid - spot missing links before they ship to a production environment.

How to Use

  1. Paste your .tf - one file or several concatenated together as input.
  2. Choose a format - Mermaid or PlantUML depending on your chosen renderer.
  3. Click Generate diagram to parse the configuration you supplied to the tool.
  4. Review the preview showing the diagram source text that was produced.
  5. Check the stats row for resource and connection counts at a glance.
  6. Resolve any errors such as unparseable HCL in one of your files.
  7. Copy the source into a Mermaid or PlantUML viewer to render it.
  8. Download the diagram source for inclusion in your project documentation.
  9. Re-run after edits to keep the picture in sync with the code.
  10. Commit the source so docs update together with the configuration you maintain.

Examples

Worked example - a small VPC. Paste a file with aws_vpc.main, aws_subnet.public referencing aws_vpc.main, and aws_instance.web using aws_subnet.public. The generator emits a Mermaid graph with three nodes and two edges, one from the subnet to the VPC and one from the instance to the subnet, making the dependency chain obvious at a glance and revealing that the instance depends on networking that must exist before it can ever be created successfully.

Benefits

  • Shared understanding - a picture the whole team can read and trust fully.
  • Always current - regenerate from code, not from fading human memory.
  • Review aid - spot missing links before they ship to real users.
  • Portable docs - text diagrams live in git and render anywhere you like.
  • Onboarding - new members grasp topology fast from a clear diagram.
  • Private - configuration is not uploaded to any external service at all.
  • Clarity - dependencies between resources become visible and discussable.

Frequently Asked Questions

What does it diagram?
It groups resources by their provider (from the resource type prefix or declared provider blocks) and draws a provider-to-resource flow.
What input does it take?
Paste .tf containing provider and resource blocks. It is parsed locally.
Does it connect to clouds?
No. It only reads the text you paste and never contacts any provider.
How do I render it?
Copy the Mermaid graph into a Mermaid editor or a mermaid code block.
Is anything uploaded?
No. Everything runs in your browser.