RoseSecurity / Terramaid

A utility for generating Mermaid diagrams from Terraform configurations
Apache License 2.0
280 stars 9 forks source link

Support for configuring mermaid environment #41

Open jsidney opened 3 months ago

jsidney commented 3 months ago

Is your feature request related to a problem? Please describe. When using Terramaid to generate diagrams for more complex/large environments, the diagram does not get generated correctly since it conflicts with certain mermaid defaults. I was generating a diagram for a complex EKS environment and the diagram contained "too many edges" to be rendered correctly.

Describe the solution you'd like It would be really nice if we could inject mermaid variables/config so to the tool so that the end-user has more control over diagrams that are generated for more complex and large environments.

Describe alternatives you've considered I am not entirely sure if there are any alternative solutions? Considering that this tool acts as a wrapper for mermaid, the end-user doesnt get access to the mermaid environment and config.

Additional context Add any other context or screenshots about the feature request here.

RoseSecurity commented 3 months ago

I'm actively working on improving this with each release, so I appreciate your feedback! The tooling handles smaller, simpler plans well, but as configurations grow, things can get messy quickly. I'd love to hear your thoughts on what aspects of the Mermaid syntax you'd like to configure.

flowchart LR
A[aws_subnet] --> B[aws_ec2_instance\nCount: 25]

Thanks again for bringing this up! If you have any example configurations, please share them so we can tailor these solutions to more complex infrastructure.

jsidney commented 3 months ago

@RoseSecurity - can you please explain what you mean by your first point? (i dont understand the difference between chart and diagram in this case). In terms of the dynamic resource blocks (counts and for_eachs), the example you show would be fantastic!