terranova
terranova copied to clipboard
[Feature] Go templates
Is your feature request related to a problem? Please describe. The TF code works but I'd like to make it a Go template to do things that at this time HCL don't allow me to do.
Describe the solution you'd like Instead of passing a static TF code, pass a Go template with the values to render it.
Describe alternatives you've considered Render the code before pass it to Terraformer.
Proposal
Allow to receive a Go template and a map with the values. This could be in the New
function or in a Parse
function or both.
Additional context Notice that the character used by Go templates by default is also used in HCL. We may consider to use a different character to make is more human readable.
References
Go Templates and Terranova is documented in the example 06 on the Terranova-Examples repo: https://github.com/johandry/terranova-examples/tree/master/06_templates.
At this time I'm not sure if this should be a feature on Terranova, I think it will add more complexity to the module/package, so maybe keep the package simple to do what is was meat to do.
The Go Templates & Terranova feature may be a external package or documented as an example.
I'll appreciate your comments on this topic.