nomad icon indicating copy to clipboard operation
nomad copied to clipboard

Add delimiter escape info in Documentation

Open cascadetile opened this issue 1 year ago • 1 comments

Proposal

Add delimiter escape info in Documentation.

In template I have an env like this: URL = http://1.1.1.1:1111/clients/{{ID}} where {{ID}} is later being replaced in Go templates, but during deploying I get the following error Template failed: (dynamic): parse: template: :12: function "ID" not defined I've searched info in https://www.nomadproject.io/docs/job-specification/hcl2/expressions and https://www.nomadproject.io/docs/job-specification/template but couldn't find.

After many trials next option worked URL = http://1.1.1.1:1111/clients/{{"{{ID}}"}}

It looks like a common solution for nomad seniors, but not for novices like me. My proposal is to add this case in documentation. Thank you

cascadetile avatar Oct 06 '22 13:10 cascadetile

Hi @cascadetile; that certainly seems like something we should note so it's easier to understand and find.

jrasell avatar Oct 06 '22 13:10 jrasell