This message was deleted.
# terraform
s
This message was deleted.
k
do you think it can allow to make diagrams of infra? somehow?
n
If you have the time to tweak the visual elements of this Python library (that piggybacks on graphviz) it makes it easy to create diagrams programmatically from a list of dictionaries https://diagrams.mingrammer.com/docs/getting-started/examples I have used this to quickly mock-up some network diagrams for PoC and swap IP addresses and hostnames as you need it, it has a lot of standard icons but you can use any png file. The beauty of it is you can loop through lists and "connect" the nodes together
a
@Kacper Twardowski In theory I could probably list resources in the tree and not just modules, but I wouldn’t call that a diagram. This tool only displays the code’s call tree, not the relationship between the resources themselves. You can refactor your codebase to have a completely different module call tree without changing a single resource in the cloud, so I think the two are orthogonal.
l
I was actually thinking about this over the weekend "is there a tool that can visualise my Terraform dependencies"? Perfect timing! 😄
s
I've used this tool previously https://github.com/28mm/blast-radius, not sure if it's compatible with the latest version of terraform
a
It’s a great idea ! Does your tool work with module sourced from a git repository ? @Arthur Busser
a
@antoine meynard it does, although I haven’t tested it much in that use-case. There may be minor issues with how module source paths are computed/displayed
Hey all! I finally took the time to open source the tool. Introducing
tftree
🎉 https://github.com/busser/tftree
@Alexander Belanger 😉