Skip to content

Instantly share code, notes, and snippets.

@lkurzyniec
Created July 7, 2022 15:22
Show Gist options
  • Save lkurzyniec/2ccf7bdd69697440cb1e7a712dddda6f to your computer and use it in GitHub Desktop.
Save lkurzyniec/2ccf7bdd69697440cb1e7a712dddda6f to your computer and use it in GitHub Desktop.
Batch file to generate tf dependency graph
@echo off
set loc=%cd%
terraform graph -type=plan > graph.txt
move /Y graph.txt "C:\Program Files\Graphviz\bin"
cd "C:\Program Files\Graphviz\bin"
dot -Tsvg graph.txt > graph.svg
move /Y graph.svg %loc%
cd %loc%
explorer graph.svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment