Introducing Terraviz: See Your Terraform Infrastructure at a Glance
A browser-based tool that turns your Terraform files into interactive infrastructure diagrams. No sign-up, no uploads - everything runs locally.
Infrastructure-as-code is one of the best things to happen to cloud engineering. But let’s be honest - staring at hundreds of lines of HCL and trying to mentally map out how everything connects is not exactly a great time.
That’s why I built Terraviz: https://terraviz.dev/.
Terraviz is a browser-based tool that takes your Terraform files and turns them into an interactive infrastructure diagram. Drop in your .tf files, and within seconds you get a visual map of your entire infrastructure - resources, dependencies, and all.
No sign-up. No backend. Your files never leave your browser.
The problem
If you’ve worked on any non-trivial Terraform project, you’ve probably experienced this: you open up a directory with dozens of .tf files, and you need to understand what’s going on. Maybe you’re onboarding onto a new team. Maybe you’re reviewing a PR that touches networking and compute. Maybe you’re trying to figure out why deleting one resource is going to cascade into something unexpected.
You can read the code line by line, grep for references, or try to hold the dependency graph in your head. But at a certain scale, that just doesn’t work.
I wanted something where I could just see it.
What Terraviz does
You give it your .tf files (drag and drop a folder, or browse for individual files), and it produces an interactive diagram.
Resources are rendered as color-coded nodes organized by category - compute, network, storage, database, security, DNS, CDN, monitoring, and more. Dependencies are auto-detected by parsing HCL reference expressions, so if your EC2 instance references a security group, that connection shows up as an edge in the graph.
Click any node and its direct dependencies light up while everything else dims. Click an edge to highlight the connection and both endpoints. Expand a node to inspect the raw HCL body. Drag, pan, and zoom to explore large infrastructures.
Smart containment
One of the features I’m most pleased with is smart containment. VPCs and subnets are rendered as visual containers, and resources are automatically placed inside their parent network based on attribute references - vpc_id, subnet_id, vpc_security_group_ids, and so on.
It even handles transitive relationships. If a resource doesn’t directly reference a VPC but references something that’s already inside one, Terraviz figures that out and places it in the right container. This makes it much easier to see the network topology of your infrastructure at a glance.
Filter, search, and export
Not every diagram needs to show everything. Terraviz lets you toggle resource categories on and off to focus on specific layers - just networking, just compute, just security. The diagram re-layouts automatically when you hide or show categories.
There’s a search bar (Cmd+F / Ctrl+F) that lets you find any resource and zoom straight to it. Useful when you’re looking at a large project and need to locate something specific.
When you need to share what you’re looking at, you can export the diagram as a high-resolution PNG or SVG - great for documentation, architecture reviews, or presentations.
Multi-cloud support
The parser works with any Terraform provider, but category detection and containment grouping have enhanced support for AWS, GCP, and Azure. This means VPCs, virtual networks, subnetworks, and their child resources are all grouped correctly regardless of which cloud you’re working with.
Resources from other providers still show up - they’re categorized using general pattern matching and displayed without containment grouping.
Privacy first
This was a non-negotiable for me. Terraform files often contain sensitive information - resource names that reveal internal architecture, variable defaults, provider configurations. Terraviz runs entirely in your browser. Your .tf files are parsed client-side, never uploaded anywhere, and never stored. There is no backend.
Light and dark mode
Because of course there is. Both themes have distinct color palettes for each resource category, and your preference is persisted across sessions.
Try it out
If you work with Terraform, give Terraviz a try. I’d love to hear what you think - there’s a feedback button right in the app.
Whether you’re onboarding, reviewing, debugging, or just trying to get a clearer picture of your infrastructure, I hope it saves you some time.