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

Previously valid escaped sequence no longer valid in v0.8.0 #10236

Closed
jemmyw opened this issue Nov 19, 2016 · 4 comments · Fixed by #10251
Closed

Previously valid escaped sequence no longer valid in v0.8.0 #10236

jemmyw opened this issue Nov 19, 2016 · 4 comments · Fixed by #10251

Comments

@jemmyw
Copy link

jemmyw commented Nov 19, 2016

terraform -v
Terraform v0.8.0-dev (0522f4322f76e760c293c0c1141e4b3b9fbfbc9b)

This is the config:

data "null_data_source" "environment" {
  inputs {
    environment = <<ENV
    ${join(",\n", formatlist("{\"name\": \"%s\", \"value\": \"%s\"}", split(",",upper(join(",", keys(var.environment)))), values(var.environment)))}
ENV
  }
}

It works with v0.7.11. With v0.8.0 it gives the error:

Error loading Terraform: Error downloading modules: module web: Error loading .terraform/modules/c1dd1c6122392193110c2e3000873ee1/service.tf: Error reading config for null_data_source[environment]: parse error at 1:32: invalid backslash escape sequence
@apparentlymart
Copy link
Contributor

Thanks for reporting this, @jemmyw. This is indeed a regression in the new version of HIL used in 0.8. I opened hashicorp/hil#35 for this, and I intend to work on fixing it now.

@mitchellh
Copy link
Contributor

I believe this is a bug but there is some BC incompat in 0.8 around this documented in the changelog. More details here: hashicorp/hcl#150

mitchellh added a commit that referenced this issue Nov 20, 2016
@mitchellh
Copy link
Contributor

Fixed by referenced PR, I'm also going to add a context test case in terraform just to make sure we always catch this use case in core in the future.

gusmat pushed a commit to gusmat/terraform that referenced this issue Dec 6, 2016
fatmcgav pushed a commit to fatmcgav/terraform that referenced this issue Feb 27, 2017
@ghost
Copy link

ghost commented Apr 19, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants