TerraVision
Turn Terraform code into professional cloud architecture diagrams that stay in sync with your infrastructure β automatic, secure, living documents

π Full documentation site β
Watch a 4-Minute Intro

What is TerraVision?
TerraVision automatically converts your Terraform code into professional-grade cloud architecture diagrams using the official AWS, GCP, and Azure icon sets. Your diagrams stay in sync with your infrastructure β no more outdated Visio, draw.io or Lucidchart files.
Why TerraVision?
- β
Always up-to-date β diagrams generated directly from your Terraform code
- β
100% client-side β no cloud access required, runs locally, your code never leaves your machine
- β
CI/CD ready β automate diagram updates on every PR merge
- β
Free & open source β no expensive diagramming tool licenses
- β
Multi-cloud β AWS (full), GCP, and Azure (core services)
- β
Interactive HTML output β clickable nodes, pan/zoom, search, animated data flow
- β
Editable draw.io export β open in draw.io, Lucidchart, or any mxGraph editor
- β
Optional AI annotations β labels, titles, and flow sequences from Ollama (local) or AWS Bedrock
- β
Terragrunt compatible β auto-detects single- and multi-module Terragrunt projects
- β
MCP server β let AI agents generate diagrams from your Terraform, see the guide
Supported Cloud Providers
| Provider | Status | Resources |
|---|
| AWS | β
Full support | 200+ services |
| Google Cloud | π Partial support | Core services |
| Azure | π Partial support | Core services |
Quick Start
Install
You also need Python 3.10+, Terraform 1.x, Graphviz, and Git. See the Installation Guide for platform-specific instructions, Docker, and Nix.
Generate your first diagram
git clone https://github.com/patrickchugh/terravision.git
cd terravision
terravision draw --source tests/fixtures/aws_terraform/eks_automode --show
terravision draw --source tests/fixtures/azure_terraform/test_vm_vmss --show
terravision draw --source https://github.com/patrickchugh/terraform-examples.git//aws/wordpress_fargate --show
That's it β your diagram is saved as architecture.png and opens automatically.
Generate an interactive HTML diagram
terravision visualise --source ./path-to-your-terraform --show
Click any resource to see its Terraform metadata, search resources, pan/zoom, and watch animated data flow on edges. The HTML is a single self-contained file that works fully offline.
Try the Interactive Demos
Click any of these to see the interactive HTML output TerraVision produces:
- π§ AWS demo β Wordpress on ECS Fargate with CloudFront, RDS, EFS
- π¦ Azure demo β VM scale set with load balancer and VNet
- π© GCP demo β Core GCP networking and compute
Basic Usage
Generate a diagram
terravision draw --source ./path-to-your-terraform
terravision draw --source https://github.com/user/repo.git
terravision draw --source ./path-to-your-terraform --format svg --outfile my-architecture
terravision draw --source ./path-to-your-terraform --format drawio --outfile my-architecture
terraform plan -out=tfplan.bin
terraform show -json tfplan.bin > plan.json
terraform graph > graph.dot
terravision draw --planfile plan.json --graphfile graph.dot --source ./path-to-your-terraform
AI-powered annotations (optional)
terravision draw --source ./path-to-your-terraform --ai-annotate ollama
terravision draw --source ./path-to-your-terraform --ai-annotate bedrock
terravision draw --source ./path-to-your-terraform --ai-annotate restapi
Only metadata and the summary graph are sent to the LLM β never your .tf source. The bedrock backend authenticates via the standard AWS credential chain (no infrastructure to deploy); restapi is configured via TV_RESTAPI_URL, TV_RESTAPI_KEY, and TV_RESTAPI_MODEL. See the Annotations Guide and AI-Powered Annotations for the full configuration.
Simplified view
terravision draw --source ./path-to-your-terraform --simplified
Strips VPCs, subnets, and networking plumbing. Great for executive presentations.
Common options
terravision --help shows full help text details.
| Option | Description | Example |
|---|
--source | Terraform directory or Git URL | ./path-to-your-terraform |
--format | Output format: png, svg, pdf, drawio, and more | svg |
--outfile | Output filename | my-architecture |
--workspace | Terraform workspace | production |
--varfile | Variable file (repeatable) | prod.tfvars |
--planfile | Pre-generated plan JSON | plan.json |
--graphfile | Pre-generated graph DOT | graph.dot |
--ai-annotate | AI annotation backend | ollama, bedrock, restapi |
--simplified | High-level view (no networking) | (flag) |
--show | Open after generation | (flag) |
Documentation
The complete documentation lives at patrickchugh.github.io/terravision.
For users:
For contributors:
FAQ
Common questions β cloud credentials, LLM data privacy, offline use, Terragrunt, output formats, and more β are answered in the FAQ on the documentation site.
Contributing
Contributions are very welcome. See CONTRIBUTING.md for development setup, coding standards, and the PR process.
Support
License
See LICENSE.
Acknowledgments
- Graphviz β diagram rendering
- Terraform β infrastructure parsing
- Terragrunt β multi-module orchestration
- Cloud provider icons from official AWS, GCP, and Azure icon sets