You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by matthieupetite March 24, 2022
Hello,
I am trying to automaticaly document my terraform code and I use inframap to generate the diagram that is include in my readme.md file of my repo at precomit stage. That's a nice point but it could be a good Idea to have the ability to also generate some other output such as json data related to the object present in the diagram.
That way you will have the ability to build accurate documentation on what is deployed.
sample
Diagram
azurerm_virtual_vwan.wan
Attribute
Value
description
name
blablabla
resource_group_name
blablabla
The text was updated successfully, but these errors were encountered:
I'll add a new option to choose the destination of a generated JSON file which will have the information found on the State/HCL.
Internally on the generate.FromState we already return a config, I'll validate the format to see if it's adequate and expose it to be written into a file. HCL does not have it yet but it should be easy to also make it return as it's kept internally but never returned.
As it's easy/faster to parse and understand, each of the first level keys will be a node on the graph.
The only thing that for now we'll not have is the description as it would be weird to add it to this format, as it would need to be for each attribute, we could check for an improvement and on each attribute have a {"value": "attr-value", "description": "attr-description"} but for now I think I prefer to KISS and return what has been read from the HCL/State.
Discussed in #177
Originally posted by matthieupetite March 24, 2022
Hello,
I am trying to automaticaly document my terraform code and I use inframap to generate the diagram that is include in my readme.md file of my repo at precomit stage. That's a nice point but it could be a good Idea to have the ability to also generate some other output such as json data related to the object present in the diagram.
That way you will have the ability to build accurate documentation on what is deployed.
sample
Diagram
azurerm_virtual_vwan.wan
The text was updated successfully, but these errors were encountered: