Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Put an
x
into the box if that apply:Description of your changes
This adds a
terraform_graph
hook that generates charts usingterraform graph
and GraphViz. My org finds something like this helpful to upkeep documentation.Test results
200 runs '
terraform_graph
v0.0.1:'Run details
TEST_NUM
200
TEST_COMMAND
pre-commit try-repo -a /home/$user/Desktop/pre-commit-terraform terraform_graph
TEST_DIR
/home/$user/$repo
TEST_DESCRIPTION
200 runs '
terraform_graph
v0.0.1:'RAW_TEST_RESULTS_FILE_NAME
terraform_graph_results
Memory info (
head -n 6 /proc/meminfo
):CPU info:
How can we test changes
Testing can be performed by running against a repo with
*.tf
files and ensuring that the correct*.svg
files are output in each directory:The most important configs for the hook are
-type
and a hook config--path-to-file
that sets the name of the output*.svg
.I cannot say that I'm a particularly good shell scripter, so if there's interest in adding this please feel free to edit.