How to escape ${var} in inline template files

281 views
Skip to first unread message

Elise Huard

unread,
Nov 23, 2016, 5:32:47 AM11/23/16
to Terraform
Hi,

First of all, thanks for the good work, terraform is a pretty amazing tool.

Recently, our inline template stopped working, and it was due to the fact that we weren't using the correct interpolation syntax
https://github.com/hashicorp/terraform/issues/10209

Pre-0.7 we could use ${} for terraform interpolation for inline templates, and $${} was a way to 'escape' variables so you could still have ${ENV_VARIABLE} in your files (thinking of systemd interpolated environment variables for instance).
Now, we need to use $${} for all terraform interpolation for inline templates.  So my question is: how do we escape ${VAR} to be left as-is in files?

Thank you,

Elise Huard

Elise Huard

unread,
Nov 23, 2016, 10:27:24 AM11/23/16
to Terraform
Ladies and gentlemen,
took some experimentation, but the answer is
$$$${VAR}

Elise

Lowe Schmidt

unread,
Nov 23, 2016, 11:26:52 AM11/23/16
to terrafo...@googlegroups.com
thanks for the update! 

--
Lowe Schmidt | +46 723 867 157

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/5149b06b-3f89-4b1b-8a54-84981271bf02%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages