-
-
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
#161
Comments
Hi @tcgbrett, I think you are describing a behavior of HCL, not a behavior of If your intention was to generate |
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? |
Hello! Apologies if I'm missing something obvious, but I keep running into a strange issue. I am trying to print some dynamic HCL so terraform can inject a var into a string.
Expected output -
query = ${thing.thing.id}
butbody.SetAttributeValue("query", cty.StringVal("${thing.thing.id}"))
producesquery = "$${thing.thing.id}"
Can anyone help me understand why this is happening and how to avoid it?
Thank you!
The text was updated successfully, but these errors were encountered: