This blog post will show you all the tools that might simplify Terraform resources and data source visualization.
For beginners, Terraform is open-source software developed by HashiCorp, that enables predictable and consistent provisioning of Cloud platform, classic infrastructure, and VPC infrastructure resources by using a high-level scripting language. You can use Hashicorp Terraform to automate your Cloud resources provisioning, rapidly build complex, multi-tier cloud environments, and enable Infrastructure-as-Code (IaC).
Think of a scenario in which you are reviewing your own Terraform code (.tf state file) and trying to understand what resources it currently provisions.
To simplify this discovery, there are several tools you can use and test:
Brainboard — Import Terraform
Brainboard is a Terraform visualization solution that enables cloud architects, DevOps, and infrastructure managers to design, deploy, manage and operate their AWS, Azure, and GCP cloud infrastructure. In literally one-click, you can import your existing Terraform infrastructure and visualize your infrastructure diagram.
In Brainboard, you can also work on centralizing your Terraform module, variables, and actions. Also, Brainboard is natively integrated with GitLab, GitHub, Azure DevOps, Bitbucket, Docker, Kubernetes, and major cloud providers.
Here is the best way to discover this breakthrough feature:
Open-source tools to visualize Terraform
We are not promoting any tool we did not tested before. If you know any other open-source Terraform visualization tools, please drop an email and would love to give it a try and if valuable for the community, will be posted on this article 😄
Terraform command
The terraform graph command is used to generate a visual representation of either a configuration or execution plan. The output is in the DOT format, which GraphViz can use to generate charts.
Blast radius
Blast Radius is a tool for reasoning about Terraform dependency graphs with interactive visualizations. It’s an open source that is used to document infrastructure, reason relationships between resources, and learn about Terraform or one of its providers. This is a step-by-step guide on how to use Blast Radius to visualize Terraform.
Terraform Visual
Terraform Visual is a simple visualization but powerful tool to help you understand your Terraform plan easily. This open-source tool only accepts JSON files.
Inframap
Inframap reads your tfstate or HCL to generate a graph specific for each provider, showing only the most important/relevant resources. Prettyplan support older versions of Terraform.
Rover
Rover is a Terraform visualizer that generates a plan file and parses the configuration in the root directory. It enables to parse the plan and configuration files to create the resource overview, the resource map, and the resource graph.
Diagrams codes
Diagrams codes is an automatic diagram generation, not limited to Terraform. It is mainly used to transform the text into quick shareable diagrams, essentially focused on improving documentation, planning, and everyday communication.
Structurizr
Structurizr builds upon the “diagrams as code” C4 model, allowing engineers to create multiple diagrams from a single model using several tools and programming languages. Pay per workspace per month with a 14-days trial.
Diagrams Mingrammer
Diagrams lets you draw the cloud system architecture in Python code. It was born for prototyping a new system architecture without any design tools. You can also describe or visualize the existing system architecture as well. It’s free but less commonly used for Terraform visualization purposes.
Cloud discovery
Cloud discovery helps engineers to analyze resources in AWS/GCP/Azure/Alibaba/IBM cloud — identifying cloud resources only works with AWS at the moment, helping you understand your cloud infrastructure.
Brainboard — Import Terraform
Brainboard is a Terraform visualization solution that enables cloud architects, DevOps, and infrastructure managers to design, deploy, manage and operate their AWS, Azure, and GCP cloud infrastructure. In literally one-click, you can import your existing Terraform infrastructure and visualize your infrastructure diagram.
Import your first Terraform architecture 👉 (free until you’re ready to Deploy)
Top comments (4)
Great post! Wasn't aware the official Terraform command line supports DOT format out of the box. That's awesome.
In the past I ran into a similar need to reason about my Terraform code, so I ended up building Codemap to visualize Terraform and a few other programming languages. Feel free to check it out :)
codemap.app
jsonviewer.tools/
Check this once
This is perfect, and a great reason to use Terraform. Brainboard in particular is gorgeous.
Dang. Looks like the k8s/onprem support isn't quite there yet. In the meantime, there's always github.com/pcasteran/terraform-gra... (better than default, but still not quite gorgeous, seems like some templating work is called for)