Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate implementation of HCL support #2042

Open
RafPe opened this issue Apr 15, 2024 · 2 comments
Open

Evaluate implementation of HCL support #2042

RafPe opened this issue Apr 15, 2024 · 2 comments

Comments

@RafPe
Copy link

RafPe commented Apr 15, 2024

Recently I am investigating using custom templating of terraform modules with the use of gomplate - hence end result is HCL.

Up to certain moment I have been able to leverage on just using YAML and template definitions however in more complex scenarios this simple setup does not work anymore.

Back in the days it has been requested via #839 however due to lack of interest did not move anywhere.

Right now I kinda worked around the setup by:

This solution has a lot of moving parts and I am also afraid it does not always properly deliver HCL formatted results.

Thats why - from engineer perspective I would say having something like {{ .somedata | data.ToHCL }} would be a great addition to this tool :)

@hairyhenderson
Copy link
Owner

Thanks for filing this @RafPe. Just to be clear - you're looking specifically for rendering support for HCL for use in Terraform, and not parsing support?

That may be possible. There's some discussion in hashicorp/hcl#375 about why parsing is quite a bit more complex.

I'm open to this feature being contributed, but I don't have the bandwidth to write it myself. If you're open to working on a PR for a data.ToHCL function, I'd review it...

@RafPe
Copy link
Author

RafPe commented Apr 15, 2024

Hi @hairyhenderson - I only want to support rendering HCL to use the given objects in Terraform.

Would you have some tips for getting that going into the code :) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants