fmalk / terraform-plantuml

Generate PlantUML Images from a Terraform State file
MIT License
37 stars 2 forks source link
aws plantuml plantuml-generator terraform

terraform-plantuml

Version License Codacy Badge Depfu

Generate PlantUML Images from a Terraform State file.

Example

See Examples for Terraform samples and their image outputs.

Considerations:

Take precautions when using State files (as they are open JSON files, most likely with secrets).

This package does NOT require Internet connection to run, nor it stores any parsed info anywhere. Its only effect is to generate two output files: .puml and optionally .png files. Any possible sensitive value is ignored, it can even be redacted beforehand if Security procedures demand so.

Safest way to generate a valid TF State file is to run terraform init, plan & apply locally, not logged to any real service, using a tool like LocalStack.

Steps

Options

See tfpuml --help for further options

Support

Limitations

Since we're using PlantUML as both input and visualization, it doesn't support intersecting groups - it is a limitation of GraphViz and not really incentivized by PlantUML (or C4 Model) design. For this project it means groups that usually intersect with AZs like Security Groups, Beanstalk or Clusters have to rely on some group repetition.

To avoid cluttering the diagram, some AWS resources are intentionally left out, like Security Groups, IAM policies/roles and CloudWatch Logs.

Roadmap

Acknowledgements