-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
cty.StringVal always doubles $ in ${} output Pt2 #163
Comments
Hi @tcgbrett, Sorry I missed this before. The escaping you are concerned about is being done by Here's the It calls ...which calls That It does that because
I also can't promise that the Terraform team at HashiCorp (who are the primarily maintainers of HCL) will be able to prioritize this, both because in this repository I'm wearing my |
Hello again. With all due respect, I would like to open this question one more time. I am doing so because I believe my reasoning wasn't clear last time. Regardless of what HCL expects, CTY will not let me just print a single $. Therefore, I believe I am facing an edge case in CTY itself, not HCL. I tried to search this repo for where that may be happening, but I am not proficient enough to solve it. I looked for $ and none of the references seemed to match what I was looking for.
Hey @apparentlymart,
Thank you for the response! Hmm, my goal was to actually not escape it, as I don't want the resulting string to be interpreted literally. I am using CTY to generate HCL for me so I don't have to write dozens of HCL files by hand. My goal is that the CTY will spit out some HCL that has template interpolation baked into it.
To give the exact example, I'm building a bunch of New Relic dashboards. I want CTY to be able to produce HCL interpolation. Here's what I keep getting stuck with tho:
And here is the go code
Do you have any suggestions?
Thanks again for reading and commenting :)
Originally posted by @tcgbrett in #161 (comment)
The text was updated successfully, but these errors were encountered: