Visualising the Cloud— Diagrams-as-code?

How do you visualise your cloud deployments? If you use Infrastructure-as-code for your cloud deployments, visualising it can be tricky. Ideally there would be a way in Terraform itself to generate nicely formatted diagrams.

Enter diagrams as code. One option is to use the cleverly named ‘Diagrams’. You can use python to create nicely formatted cloud architecture diagrams for Azure, AWS, GCP and more.

Advantages of this approach would be:

  • Version-able using source control
  • Consistently formatted
  • Tooling is consistent

I modified one of the examples to use the Azure icons instead of AWS:

Which generated this!…

Next up I thought I would attempt the Azure Monitor Distributed log architecture (something i was working on at the time), and quickly found that the icon set is quite limited. For example. Options for automation accounts, alerts and azure monitor were missing.

Other problems with this approach include the fact that the diagrams are not directly generated from the Terraform code, it is a separate piece of python code to maintain. If the Terraform code changes, the diagram will need to also be updated, and drift becomes likely. The tool is also quite basic and restrictive as it stands, although seems like a great option for creating diagrams for README files in projects with simple architecture.

Another option is ilograph, although it is heavily restricted when using the free option, it has a nice web front-end and also creates diagrams-as-code.

You could also use a visual editor like www.draw.io and save the diagrams direct to Github or Gitlab to also achieve versioning and consistency.

Another great option for general visualisation of AWS is Cloudcraft, the paid option can enable 3D AWS diagrams to be created directly by hooking the subscription up to to Cloudcraft. No diagrams-as-code here though!

https://www.cloudcraft.co

Check out more info on diagrams here:

An experienced IT professional, focused on cloud tech and DevOps. Specialising in Azure, AWS, & Terraform. Currently working at BT Enterprise as a consultant.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store