Feature request: add the capability to dump from dict to HCL2
mattwwarren opened this issue · comments
Hello! I am working on adding support for manipulating terraform variables with CloudTruth. I'd like to use this library to load a variables.tf file but need to write the file back out after processing it through our template engine. Would you be interested in this contribution? I'm not terribly familiar with Lark so I don't know how feasible this effort might be.
Thanks in advance!
Hello @mattwwarren
Just making sure I understand the use case:
you'd like to parse .tf
file into python structure, perform some operations on the structure, and then dump the result back into a .tf
file?
And thanks for the request
Yes, your use case is exactly what I hope to do. Specifically, as we parse out variable values, we want to replace those with references to the CloudTruth objects so the user can use our template or terraform provider to pull those values in dynamically.
Thank you!
Closing this issue since this is a Duplicate of #23