Visualize your Terraform

Visualize your Terraform

I know, there is?`terraform graph`?command, and you can use it with?`graphviz` tool, which is?recommanded approach?by hashicorp. For me, it was not enough because my graph was too big, and it was really painful to move around. I needed something more.

I have tried with?Blast Radius, but I was no luck here. Additionally, it looks like Blast Radius is no longer maintained.

Then I gave a shot to?Rover, and it was a bull's-eye.

--------

Simply:

  • generate plan file with?`terraform plan -out plan.out`?command
  • convert plan file to?json?version with?`terraform show -json plan.out > plan.json`?command
  • run?docker?container with?`docker run --rm -it -p 9000:9000 -v $(pwd)/plan.json:/src/plan.json im2nguyen/rover:latest -planJSONPath=plan.json`?command

No alt text provided for this image

  • enter Rover in your browser with?`https://localhost:9000/`
  • boom, that's it!

No alt text provided for this image

At the end, worth mentioning that plan file should be generated in Linux version to works properly.

Cheers!

PL version: https://kurzyniec.pl/blog/zwizualizuj-kod-terraform/

Tarak ??

Senior Growth Manager | No code & Dev tools

2 年

?ukasz thanks for sharing! Speaking about visualization Terraform code, for eg when using Azure, here’s a video that could be interesting: https://youtu.be/mTQBa4hSZQg

回复

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

?ukasz Kurzyniec.p?l的更多文章

  • GitHub - Auto-merge Dependabot's PRs

    GitHub - Auto-merge Dependabot's PRs

    Below note is based on Dependabot - Fetch Metadata Action. Up-to-date code could be found in my repo here.

  • Boilerplate of API in .NET 6

    Boilerplate of API in .NET 6

    It's been a while since I published the very first version of my boilerplate of API. I made there a lot of…

  • terraform version switcher for Windows

    terraform version switcher for Windows

    1. Download some terraform with Chocolatey choco install terraform --version 0.

    6 条评论
  • Boilerplate of API in .NET Core 3.1

    Boilerplate of API in .NET Core 3.1

    Boilerplate is a piece of code that helps you to quickly kick-off a project or start writing your source code. It is…

    2 条评论
  • Comma dangle - simple rule that makes your GIT life clean and easy

    Comma dangle - simple rule that makes your GIT life clean and easy

    Trailing commas in array and object literals are valid. Benefits: One line change - clean diff Easy conflict resolving

  • LINQPad – The .NET Programmer’s Playground

    LINQPad – The .NET Programmer’s Playground

    I use LINQPad almost every day to execute any C# code I write, and sometimes it totally replaces Visual Studio for me…

  • Debug Like a Magician – OzCode

    Debug Like a Magician – OzCode

    I am a typical .NET developer and I use Visual Studio on a daily basis.

    1 条评论

社区洞察

其他会员也浏览了