Make Terraform as diagram
Tags: terraform, devops, azure, aws
Published: 2022-10-24 13:48:16

A picture is worth thousands of words. Am I right?

Indeed, when working on terraforming infrastructures, one of the best practices is to work on visualizing Terraform.

TL;DR
[Brainboard](https://www.brainboard.co/solution-for/personas/dev-ops#) is the best cloud infrastructure diagram designer out there. It allows you to automatically generate cloud architecture diagrams in the format you want from any Terraform file or repo. It’s free to use.

## Infrastructure-as-code
Infrastructure-as-Code (IaC) is by definition, the managing and provisioning of infrastructure through code instead of through manual processes.

Terraform is a declarative language that often describes, automates, and manages cloud resources. Terraform is a layer, of many, that builds up your architecture, from the ground up.

## The problem with Terraform
Architecture diagrams are a great tool to have in your tool stack. Simply viewing your infrastructure instead of rendering it in Terraform, opens up a whole new world to understand clearly complex areas to improve documentation, debugging and security, tools or designs, and to add new team members.

The only problem is that creating cloud charts manually is not easy. It does take time you may not have to make sure you’ve included all the elements, and it’s frustrating to get them to appear correctly in the solution. This makes transferring information from code to non-code-based applications prone to error. It’s no surprise that many engineers are reluctant to diagram infrastructure.

## The solution is Terraform as Diagram
Infrastructure-as-Diagram (IaD) is by definition, the managing and provisioning of infrastructure through Diagrams instead of code & manual processes. It is a relatively new way of working on infrastructure with great growth potential in the DevOps ecosystem of IT tools.

Obviously, it is easy to read your tf files when your infrastructures can be described in 50 lines of code. But imagine 5000 lines of code?

Infrastructure-as-diagram is probably the best way to represent, understand and scale any architecture. You can choose to build the cloud diagram from the ground up thanks to dragging & drop capabilities but importing your existing repo could accelerate the existing build.

By visualizing your terraform, you are able to understand many concepts that were missed, ignored, or banalized by previous teams across environments.

I wonder why to Terraform itself did not yet design a tool to help visualize infrastructure-as-code.

## Enter [Brainboard](https://app.brainboard.co/)

![This is Brainboard, the Best Cloud Infrastructure Diagram Designer
](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rmrgro2i36qjkpseicm6.png)


[Brainboard](https://app.brainboard.co/) is the best cloud infrastructure diagram designer out there. It allows you to automatically generate cloud architecture diagrams in the format you want from any Terraform file or repo.

[Brainboard](https://app.brainboard.co/) was conceptualized to make your life much easier, saving time and helping to operate your cloud infrastructure more efficiently. Brainboard “[import feature](https://www.brainboard.co/features/terraform-import)” reads Terraform state and HCL files and renders them for you in a comprehensive and visual way.

![Import Terraform and visualize Terraform with Brainboard
](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qy6jdaldnsjqcp55q2bi.png)

[Brainboard](https://www.brainboard.co/solution-for/personas/dev-ops#) supports:

- Import from any Terraform file
- Import from any public and private repo
- Import from Azure
- Import from AWS — this feature is limited to Enterprise Plan

We continue to deliver the best readable auto-generated terraform code from a diagram. This code is built thanks to the 15 years of experience our founders have and the terraform best practices from the community.

[Brainboard](https://www.brainboard.co/solution-for/personas/dev-ops#) supports AWS, Azure, GCP, and Scaleway. OCI is soon to be added to the list.

If you are worried about sensitive data from your terraform repo, don’t bother. [Brainboard](https://www.brainboard.co/solution-for/personas/dev-ops#) prunes this information and only uses data relevant to the graph to map your cloud infrastructure in a clear way. Your credentials are safe inside [Brainboard](https://www.brainboard.co/solution-for/personas/dev-ops#)’s cockpit as well as all your deployments and templates.

We did push the boundaries of low coding, bringing ready-to-use cloud architectures’ templates available for everyone. Naturally, with the SaaS offer, you have access to building your own private cloud templates gallery.

[Discover Brainboard →](https://www.brainboard.co/solution-for/personas/dev-ops#)

## The Benefits of Generating your Terraform Diagram

Visualizing your cloud infrastructure can benefit all engineers and stakeholders to go faster and validate your imported infrastructure:

1. Migrate and map your Cloud and visualize your infrastructure to see key cloud governance data in context and understand if any elements are relationship, or unidentified. It would help you avoid risk and cut unnecessary costs. Group specific elements such as security groups, VPCs, Virtual Machines, Zones, and more to inspect the terraform code generated.
2. Generate or update cloud diagrams to confirm that what was built matches what was intended, avoiding downtime and preventing holes in security and infrastructure. Validate essential details such as instance sizes, regions, and other data, and identify security concerns.
3. Clearly communicate current cloud architecture by automating cloud documentation IDE and keeping it in a central location. Keep everyone on the same page — from Cloud Architects and engineers to external and internal stakeholders — without having to manually diagram changes to your cloud environment.
4. Validate your imported cloud infrastructure. Build your CICD engine and deploy your cloud infrastructure whenever you are ready. Versions your cloud architecture and create templates to do the work once.

In sum, visualizing your cloud environment has the sole purpose to reduce the scarcity of (re)creating your built cloud infrastructure.

## The Future of Brainboard’s Terraform Visualizer
The future’s looking bright for [Brainboard](https://www.brainboard.co/solution-for/personas/dev-ops#). The terraform visualizer has been tested by thousands of engineers, cloud architects, and DevOps. The result: People are lovin’ it!

Another big part of [Brainboard](https://www.brainboard.co/solution-for/personas/dev-ops#)’s project is to deliver the best terraform visual translation we can generate, regardless of the imported input. Right now, it supports any terraform file, public and private repos as well as all Azure cloud resources. We are working hard to bring it to AWS and GCP as well as soon-to-be Oracle.

We are confident enough to be the first technology company able to bring visual cloud build, deployment, and management to all.

We are not prone to open-source the whole terraform diagram visualizer as it is prone to errors and failure. Built with the community, our terraform visualizer brings clarity to thousands of engineers every day and we will continue to thrive success by getting greater feedback.

Feel free to reach out if you have any feedback on our Import feature.