DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Closing the Drift Loop: An AI Agent That Drafts Terraform Fixes
  • Your Terraform Monolith Isn't Too Big. It's Tightly Coupled.
  • Inside terraform-provider-archive: A Memory Pattern From 2016 That Scales With Your Lambdas
  • LocalStack and Terraform: A Clean Local AWS Setup Guide

Trending

  • 7 Swift Features That Will Let You Delete Code Tomorrow
  • Building a Grounded Search Agent With Foundry, Azure AI Search, and Cosmos DB, Containerized With Docker and Observed With Grafana
  • Prompt Caching for LLMs, Part 2: Semantic Caching in Production
  • Building a Feature Store With Neo4j and Feast

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Tools to Visualize your Terraform plan

Tools to Visualize your Terraform plan

It all started with this code sample with Terraform scripts For starters, Terraform is open-source software, developed by HashiCorp, that enables predictable...

By 
Vidyasagar (Sarath Chandra) Machupalli FBCS
DZone Core CORE ·
Sep. 14, 21 · Opinion
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
8.4K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

It all started with this code sample with Terraform scripts

For starters, Terraform is open-source software, developed by HashiCorp, that enables predictable and consistent provisioning of IBM Cloud platform, classic infrastructure, and VPC infrastructure resources by using a high-level scripting language. You can use Terraform to automate your IBM Cloud resource provisioning, rapidly build complex, multi-tier cloud environments, and enable Infrastructure as Code (IaC).

Think of a scenario in which you are revisiting your own Terraform scripts and scratching your head to understand what resources it provisions.

To simplify this, there is an in-built Terraform command

terraform graph 

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 can be used by GraphViz to generate charts.

You can use the command to generate a .png file from the dot output

If there are too many resources, then the graph will look something like this.

As you can see, readability is a challenge and also there are extra nodes in the graph that are not required. So, you need better tools to visualize your Terraform plan.

Blast radius

Blast Radius is a tool for reasoning about Terraform dependency graphs through interactive visualizations. Awesome tool but couldn't make it work with the newer versions of Terraform. As per the Dockerfile in the respective repository and the comments on the issues, the last Terraform version that worked fine was 0.12.x.

Terraform Visual

Terraform Visual is a simple but powerful tool to help you understand your Terraform plan easily.

Click here to see the large image

Needs additional steps like generating plan.dot file and then plan.json file. but, a pretty good tool for any version of Terraform.

Inframap

Inframap reads your tfstate or HCL to generate a graph specific for each provider, showing only the resources that are most important/relevant.

If you know any other visualization tools, please drop in a comment below and would love to give it a try.

Terraform (software)

Published at DZone with permission of Vidyasagar (Sarath Chandra) Machupalli FBCS. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Closing the Drift Loop: An AI Agent That Drafts Terraform Fixes
  • Your Terraform Monolith Isn't Too Big. It's Tightly Coupled.
  • Inside terraform-provider-archive: A Memory Pattern From 2016 That Scales With Your Lambdas
  • LocalStack and Terraform: A Clean Local AWS Setup Guide

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook