Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to escape ${ in terragrunt configuration file #564

Closed
andresvia opened this issue Sep 12, 2018 · 1 comment
Closed

No way to escape ${ in terragrunt configuration file #564

andresvia opened this issue Sep 12, 2018 · 1 comment

Comments

@andresvia
Copy link

andresvia commented Sep 12, 2018

Assuming terraform.tfvars is the Terragrunt configuration file, I was not able to find any way to pass variables values containing ${ (the expected escape sequence $${ doesn't work). In the repro bellow my last resort was to octal escape the dollar sign:

Terraform code (main.tf)

variable "var1" {}
resource "random_pet" "pet" {
  prefix = "${data.template_file.a_template.rendered}-"
}
data "template_file" "a_template" {
  template = "${var.var1}"
  vars {
    text = "replacement"
  }
}

Terragrunt configuration (terraform.tfvars)

terragrunt {
  terraform {
    source = "./"
  }
}
var1 = "\044{text}" // "${text}" fails with [terragrunt] 2018/09/12 00:12:09 Invalid interpolation syntax. Expected syntax of the form '${function_name()}', but got '${text}'

Maybe related to: #466

@brikis98
Copy link
Member

Duplicate of #544. Terragrunt uses an ugly regex to process interpolations and escapes and comments don't work properly Will hopefully be fixed when we update to to HCL2 in #466.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants