Automate your AWS architecture diagrams
Photo by Daniel McCullough on Unsplash

Automate your AWS architecture diagrams

If you use terraform or any other IaC solution to provision your cloud infrastructure, you might have faced some of these questions.

?? How do I automate the infrastructure design diagram and infrastructure cost estimates?

?? How can I keep my infrastructure design diagram up to date with my IaC?

?? How can I get an architecture diagram that accurately represents my Infrastructure As Code?

?? How can I see a visual representation of all the changes my PR will make to the infrastructure?

?? How does my PR impact the infra cost?

?? Can I see the historical changes to my infrastructure not just as code but also as an architecture diagram?

?? How do I generate my cloud architecture diagram as part of CI-CD?

Recently I tried my hands with a couple of tools to solve these common IaC scenarios.

Pluralith is a tool to visualize your Terraform state and automate infrastructure documentation. It also helps detect and visualize infrastructure?drift and the?cost?of your infrastructure (via Infracost).

This approach of arriving at the architecture from the terraform state, I feel, is better than some of the diagram as code solutions since you do not need to maintain anything additional apart from your terraform code. There are a few other similar solutions out there like inframap, brainboard, etc. However, the CI-CD integration of Pluralith can be a differentiator.

Infracost shows cloud cost estimates for Terraform. It lets DevOps, SRE, and engineers see a cost breakdown and understand costs?before making changes in the terminal or pull requests.

As a demo solution, I tried to incorporate both these tools into an IaC pipeline using Github Actions and tried to update PR comments with proposed architectural and cost changes.

All the code for this demo and the implementation details are available on Github.

The Infracost run of the pipeline adds information in the PR comments that provide a view of the change in cost estimates that the PR will make.

No alt text provided for this image

The Pluralith run of the pipeline adds information in the PR comments that provide a view of the infrastructure changes that the PR will make and provides a view of the infrastructure's created, updated, destroyed, recreated, and drifted components.

No alt text provided for this image

You could add the Pluralith Infrastructure diagram in your RAEDME.md by just adding one line in your readme file.

Pluralith Dashboard

The Pluralith dashboard provides a consolidated view of the Infrastructure with the option of drilling down to individual infrastructure components. It provides a view of the infrastructure's created, updated, destroyed, recreated, and drifted components. Pluralith can be run locally as well.

No alt text provided for this image

Cost View

The Cost view of the dashboard provides a view of which component will make what cost estimate changes. The cost component uses Infracost to get the cost estimates.

No alt text provided for this image

History

The Dashboard also provides an option to view historical changes that the Infrastructure has gone through with the option of drilling down to the cost and design of all the components for these runs.

No alt text provided for this image

Terraform Cloud does provide features for a cost estimate for a limited number of services and the capability to set policies around cost; however, you need to purchase the enterprise edition for this feature.

Terraform also has a feature to generate an architecture diagram using terraform graph; however, it is pretty rudimentary at this point.

It will be interesting to see how these tools and features evolve in this space of IaC.

While Pluralith is free for local use, the CI runs come at a cost. They made the cost changes in the past week itself. I did my tests last weekend and got some CI runs before the changes were made. :)

Tarak ??

Senior Growth Manager & CSM

2 年

Great post and questions Pinaki! Thanks for the mention ?? Happy to guide you through Brainboard

要查看或添加评论,请登录

Pinaki Mukherjee的更多文章

  • Managing your network CIDRs across multiple AWS accounts in a Control Tower setup

    Managing your network CIDRs across multiple AWS accounts in a Control Tower setup

    Have you faced these questions while setting up your VPCs and subnets in AWS? Which CIDR should I pick up for my VPC?…

    3 条评论
  • How to buy a new car using the "Six Pillars of the AWS Well-Architected framework."

    How to buy a new car using the "Six Pillars of the AWS Well-Architected framework."

    One of the aspects of writing on technical topics that I love is when I get an opportunity to explain seemingly…

    10 条评论
  • Lessons from managing Terraform at scale

    Lessons from managing Terraform at scale

    I have been thinking of creating an article to list a few of my experiences managing Terraform setups. About a month…

    1 条评论
  • 6 Pillars of DevOps

    6 Pillars of DevOps

    What is DevOps? Several popular definitions are in use. I explore some of these in my previous articles, "What is…

    2 条评论
  • Let's talk secrets

    Let's talk secrets

    Australia saw one of the most significant cyber attacks unfold recently. While corporates and customers still grapple…

    8 条评论
  • A Brief history of the CI-CD orchestrator

    A Brief history of the CI-CD orchestrator

    The CI-CD orchestrator is the backbone of a DevOps toolchain. It is the tool that ties all the other tools in your…

    10 条评论
  • What is DevOps?

    What is DevOps?

    I have always wondered what would be the best way to explain DevOps in non-technical terms. An example keeps coming to…

    27 条评论
  • A Career in DevOps

    A Career in DevOps

    In the past week, I got this question on a couple of occasions about how to make a transition and progress in a career…

    17 条评论

社区洞察

其他会员也浏览了