Single quotes (') don't support escape sequences, so if your passwords don't contain single quotes use them:
SQLSERVER_PASSWORD='[%.Data.data.SQLSERVER_PASSWORD%]'
However if your passwords may contain any character you may have to resort to JSON encoding/decoding them:
SQLSERVER_PASSWORD=[%.Data.data.SQLSERVER_PASSWORD% | toJSON]
That requires JSON decoding in your application to convert escaped characters (
\",
\', etc) back into their literal forms (
",
', etc).
This is obviously an unfortunate amount of complexity. I think a better approach for Nomad's parser would be to split on the first "=" and read the rest of the line in as a literal. Please feel open a Github issue if you'd like to see this improved in the future!