Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upEscaping Remote ENV in Interpolation #1098
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Use a second dollar sign: |
mitchellh
closed this
Mar 2, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bitglue
Apr 7, 2015
Maybe this could be documented somewhere? I don't see it in the configuration syntax or the interpolation syntax.
But also, it doesn't seem to work. While it does avoid the syntax error due to the invalid interpolation, it also puts a literal $$ in the resulting parsed string.
bitglue
commented
Apr 7, 2015
|
Maybe this could be documented somewhere? I don't see it in the configuration syntax or the interpolation syntax. But also, it doesn't seem to work. While it does avoid the syntax error due to the invalid interpolation, it also puts a literal |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bentterp
Aug 26, 2015
I ran into the same issue with an AWS policy as a heredoc as per the documentation:
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:_LoginProfile",
"iam:_AccessKey",
"iam:AccessKey"
],
"Resource": "arn:aws:iam::564070118781:user/$${aws:username}"
},
This results in the policydocument on AWS having double $'s - which of course doesn't work
Using single $ makes terraform try to interpolate, and fail
bentterp
commented
Aug 26, 2015
|
I ran into the same issue with an AWS policy as a heredoc as per the documentation:
{ This results in the policydocument on AWS having double $'s - which of course doesn't work |
delianides commentedMar 2, 2015
When using systemd on CoreOS, consider the following:
If I place this in a heredoc (hashicorp/hcl#6) it fails because terraform tries to interpolate the FLANNEL environment variables. Is there anyway to escape those so terraform doesn't try to expand them?