-
Notifications
You must be signed in to change notification settings - Fork 602
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
Support heredoc without interpolation #207
Comments
Hi @arnd! Thanks for this suggestion. I understand the benefits of such a syntax; it can be frustrating to need to escape everything when using a nested language that also uses There is a tension here with the complexity of the language; there are already several different string variants in HCL, with subtle differences between them, and so I'm somewhat reticent to add another. I'm also a little concerned about activating such a mode using such a subtle syntax, since it is unlikely to be obvious to all readers that placing the identifier in quotes activates a new behavior. I understand that this is familiar to those with more advanced knowledge of shell languages, but HCL tries to be more explicit to ease understanding of configuration by newcomers. For Terraform in particular, our recommendation would be to factor out such scripts into a separate file and include it using the This doesn't generalize to other applications that use HCL of course, but it seems like you are primarily motivated by a Terraform-specific use-case here. Given that Terraform has the Thanks again for suggesting this; I understand that the |
It would be great if herdoc syntax for strings would allow for heredocs without interpolation (e.g. like in Bash).
HCL Template
Expected behavior
I would have expected, that the string gets assigned without interpolation.
Actual behavior
What actually happened?
An error is thrown, because of the quotes around EOT.
However, obviously without the quotes, the hcl parser will choke on the string because it tries to interpolate ${.
Steps to reproduce
The text was updated successfully, but these errors were encountered: