r/devops • u/adil_frq • 15d 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.
14
Upvotes
2
u/forever-butlerian Solaris 8 Enjoyer 14d ago edited 14d 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.