language-terraform icon indicating copy to clipboard operation
language-terraform copied to clipboard

remote-exec escape sequences

Open montge opened this issue 6 years ago • 1 comments

I'm working on figuring out the best way to handle escape sequences for remote-exec. While this appears to be valid JSON, in the atom package it doesn't highlight properly.

provisioner "remote-exec" {
    inline = [
"sudo grep -qxF 'HTTP_PROXY=\"myproxy:8080\"' /etc/sysconfig/docker || echo 'HTTP_PROXY=\"http://myproxy:8080\"' | sudo tee -a /etc/sysconfig/docker",
"sudo grep -qxF 'http_proxy=\"${HTTP_PROXY}\"' /etc/sysconfig/docker || echo 'http_proxy=\"${HTTP_PROXY}\"' | sudo tee -a /etc/sysconfig/docker",
]
}

Note I have a open issue on the terraform side to verify how to handle the $ and {}

montge avatar Aug 05 '19 12:08 montge

@montge is this still an issue for you? Could you give the link to the issue on terraform side?

cmur2 avatar Nov 15 '20 14:11 cmur2