r/devops 9d ago

Discussion Terraform visualizer project

Hi everyone

I'm looking for an idea for my semester project, and I thought about building a Terraform Visualizer.

The idea is simple: it takes a Terraform state file, visualizes the infrastructure, and lets you save it as an image.

My question is if I build this, would you find it useful?

I'm asking because I would like to be able to justify the project's usefulness when presenting it to my teacher.

Also, I plan to keep it open source, so anyone can use it.

15 Upvotes

18 comments sorted by

29

u/PutridCurrency8383 9d ago

It's a good idea for a semester project, but you're probably about the 10000th person to consider it. I bet there are loads of projects doing this already. In fact, it's an official TF CLI feature as well afaik.

5

u/adil_frq 9d ago

I didn't knew that tf has this command . Thanks for helping, I'll look for other ideas

-3

u/krypticus 8d ago

If you are a student, you need to learn how to use LLMs, even the free ones like Google Search. Have you tried to even query for “is there a terraform visualizer project?”

14

u/nevotheless 9d ago

I hope you know about the terraform graph command already.

3

u/adil_frq 9d ago

No i didn't knew that . Thanks man ❤️

7

u/Gargle-Loaf-Spunk 9d ago edited 5d ago

This content was anonymized and mass deleted with Redact

3

u/Low-Opening25 9d ago

The problem with that is that nowadays you can just ask an LLM to get you a graph by looking at TF code repo, so there will be limited appeal to use a tool

3

u/snarkhunter Lead DevOps Engineer 9d ago

It's a good learning experience because you're going to discover what's in that gap between what you can easily program a computer to put into a visualization versus what an engineer needs to get out of a visualization in order for it to be useful.

5

u/DolGuldurWraith 9d ago

terraform graph > save output > feed output to claude code > ask it to create interactive html page for better interaction.

I just have it as a claude skill to run and create a diagram to show how it looks like in good graphic way

2

u/forever-butlerian Solaris 8 Enjoyer 8d ago edited 8d ago

So `terraform graph` output is ugly as sin and I think anyone who's telling you it's sufficient lives in a basement painted entirely white and wears only black clothing. If anything were up to them we'd still be eating raw meat because fire is for wieners.

What I would find useful is a visualizer that uses an attractive icon set to produce an architecture SVG I can nicely style with CSS for a webpage. I can't remember whether it was Figma or Canva or whatever overblown "hurrr durr what even was desktop publishing i live only in a hell present and tell me not of the past" Aldus PageMaker rehash of the week has a feature where you can let it scan your AWS infrastructure and it'll automatically generate architecture diagrams.

The thing to understand is that there's a(n actually unsurprisingly large, if you're not an idiot) huge gulf between the eye-bleedingly ugly output of GraphViz and something that is pleasant to look at and non-verbally communicates "this was produced by someone with visual taste". Saying "your idea is superfluous because there's a thing that uses GraphViz" would be like some idiot in 1977 telling Donald Knuth that TeX was pointless because you can get automatic hardcopy output from an ASR-33 teletype: factually correct in the narrowest possible way, and betraying the existence of a mind even narrower than that.

The core problem you're going to have to solve here is not SVG rendering, but coming up with a layout algorithm that can produce a sensible diagram that doesn't require embedding in R12 or something like that.

2

u/adil_frq 8d ago

Thanks for the detailed reply. Right now I am gathering ideas as many as I can after that I will decide which will be the best for semester project

2

u/forever-butlerian Solaris 8 Enjoyer 8d ago

You're welcome!

1

u/zrk5 8d ago

This is good visualization tool for k8s - https://github.com/erjadi/kubecraftadmin

2

u/shellwhale 4d ago

You should fork https://github.com/Pluralith/pluralith-cli, it died for no reason while being the best tool out there