io.github.patrickchugh/terravision
Supports diagramming Google Cloud resources defined in Terraform, covering core GCP services such as compute and networking with official icon sets.
Provides optional AI-powered annotations, including labels, titles, and flow sequences, using local LLMs through Ollama without sending data off-machine.
Provides optional AI-powered annotations via any OpenAI-compatible REST API endpoint, including OpenAI, configured through environment variables.
Generates professional cloud architecture diagrams from Terraform configurations, supporting local directories, Git repositories, plan files, and Terragrunt projects with multiple output formats.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@io.github.patrickchugh/terravisionGenerate an architecture diagram from my Terraform code in ./infra"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TerraVision
Turn Terraform code into professional cloud architecture diagrams that stay in sync with your infrastructure — automatic, secure, living documents
Watch a 4-Minute Intro
![]()
Related MCP server: cloudwright-mcp
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
pipx install terravision # or: pip install terravision if in a virtual envYou 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
# EKS cluster example
terravision draw --source tests/fixtures/aws_terraform/eks_automode --show
# Azure VM scale set
terravision draw --source tests/fixtures/azure_terraform/test_vm_vmss --show
# From a public Git repo (note the // for subfolder)
terravision draw --source https://github.com/patrickchugh/terraform-examples.git//aws/wordpress_fargate --showThat's it — your diagram is saved as architecture.png and opens automatically.
Generate an interactive HTML diagram
terravision visualise --source ./path-to-your-terraform --showClick 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
# From a local directory
terravision draw --source ./path-to-your-terraform
# From a Git repository
terravision draw --source https://github.com/user/repo.git
# Custom format and filename
terravision draw --source ./path-to-your-terraform --format svg --outfile my-architecture
# Editable draw.io file
terravision draw --source ./path-to-your-terraform --format drawio --outfile my-architectureUse a pre-generated Terraform plan (no cloud credentials needed)
# Step 1: in your Terraform environment
terraform plan -out=tfplan.bin
terraform show -json tfplan.bin > plan.json
terraform graph > graph.dot
# Step 2: diagram generation, no Terraform or cloud access required
terravision draw --planfile plan.json --graphfile graph.dot --source ./path-to-your-terraformAI-powered annotations (optional)
terravision draw --source ./path-to-your-terraform --ai-annotate ollama # local LLM (no data leaves your machine)
terravision draw --source ./path-to-your-terraform --ai-annotate bedrock # AWS Bedrock via boto3 (uses your AWS credentials)
terravision draw --source ./path-to-your-terraform --ai-annotate restapi # any OpenAI-compatible endpoint (OpenAI, LiteLLM, vLLM, ...)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 --simplifiedStrips VPCs, subnets, and networking plumbing. Great for executive presentations.
Common options
terravision --help shows full help text details.
Option | Description | Example |
| Terraform directory or Git URL |
|
| Output format: |
|
| Output filename |
|
| Terraform workspace |
|
| Variable file (repeatable) |
|
| Pre-generated plan JSON |
|
| Pre-generated graph DOT |
|
| AI annotation backend |
|
| High-level view (no networking) | (flag) |
| 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
Issues: GitHub Issues
Discussions: GitHub Discussions
Documentation: patrickchugh.github.io/terravision
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
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
Unified API to query AWS, GCP, Azure and generate Terraform/CLI execution kits for AI agents.
Create and edit architecture diagrams from your AI agent; get an SVG and a live editable canvas.
Compare, estimate, and deploy cloud infrastructure across AWS, GCP, and Azure for AI agents.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to visualize cloud architecture diagrams, generate and import Terraform HCL, and manage infrastructure resources directly from chat through the CloudForge platform.189 npmMIT
- AlicenseAqualityCmaintenanceAI-powered cloud architecture - describe infrastructure in natural language, get Terraform, cost estimates, and compliance reports1932MIT
- AlicenseNot gradedqualityCmaintenanceProfessional AI-powered architecture diagram generator with multi-cloud support and MCP server integration. Generates beautiful, accurate diagrams with provider-specific icons for AWS, Azure, GCP, Kubernetes, and more.11MIT
- AlicenseAqualityBmaintenanceGenerates professional architecture diagrams from natural language descriptions using template-driven prompts and swappable AI image providers.71MIT