Allow disabling hcl2 interpolation for string literals #10777
Labels
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
stage/duplicate
theme/hcl
type/enhancement
HCLv2 added more comprehensive support for expression interpolation within strings. Users can insert variable references (e.g.
${var.user_field}
) or expressions in here-doc style syntax:This interpolation though comes with downsides. Nomad templates frequently embed shell/perl scripts or embedded nijna-like templates that can conflict with the use of
${
or%{
. Users must escape references of${
and%{
, a tedious task, specially for users upgrading from pre-1.0.0 nomad versions.We should consider adding a mechanism to disable HCLv2 interpolation processing; e.g. adopt the bash heredoc mechanism to disable variables, by using
'
, e.g.<<'EOF'
.The change needs to be coordinated with the hcl library.
This issue was raised in #10743 and #9838 (comment) .
The text was updated successfully, but these errors were encountered: