{"action":"opened","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/16699","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/16699/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/16699/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/16699/events","html_url":"https://github.com/hashicorp/terraform/issues/16699","id":275107521,"number":16699,"title":"template_file: template attrib accepts interpolated string, but will not render vars","user":{"login":"dayglojesus","id":317143,"avatar_url":"https://avatars0.githubusercontent.com/u/317143?v=4","gravatar_id":"","url":"https://api.github.com/users/dayglojesus","html_url":"https://github.com/dayglojesus","followers_url":"https://api.github.com/users/dayglojesus/followers","following_url":"https://api.github.com/users/dayglojesus/following{/other_user}","gists_url":"https://api.github.com/users/dayglojesus/gists{/gist_id}","starred_url":"https://api.github.com/users/dayglojesus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dayglojesus/subscriptions","organizations_url":"https://api.github.com/users/dayglojesus/orgs","repos_url":"https://api.github.com/users/dayglojesus/repos","events_url":"https://api.github.com/users/dayglojesus/events{/privacy}","received_events_url":"https://api.github.com/users/dayglojesus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-18T20:29:15Z","updated_at":"2017-11-18T20:29:15Z","closed_at":null,"author_association":"NONE","body":"### Terraform Version\r\n0.9.6 to Latest (0.11.0)\r\n\r\n### Terraform Configuration Files\r\n```\r\nvariable \"my_template\" {\r\n  default = \"some_key: $${insert_here}\"\r\n}\r\n\r\ndata \"template_file\" \"document\" {\r\n  template = \"${var.my_template}\"\r\n\r\n  vars {\r\n    insert_here = \"some_value\"\r\n  }\r\n}\r\n\r\noutput \"info\" {\r\n  value = \"${data.template_file.document.rendered}\"\r\n}\r\n```\r\n\r\n### Debug Output\r\nhttps://gist.github.com/dayglojesus/96375c2daa6ecedc398b729b2a585bca\r\n\r\n### Expected Behavior\r\nThe properly escaped `$${insert_here}` should be evaluated *inside* the `template_file` resource as a template variable (`${insert_here}`), not rendered as a literal string.\r\n\r\n### Actual Behavior\r\nTemplate is rendered successfully, but the vars in the template are not substituted. Instead, the escaped vars ($$insert_here) are interpreted literally.\r\n```\r\ndata.template_file.document:\r\n  id = ed48139b5a707a192bc659d2d7303b35a5a74635029b80e3a0ef800e293cd00d\r\n  rendered = some_key: ${insert_here}\r\n  template = some_key: $${insert_here}\r\n  vars.% = 1\r\n  vars.insert_here = some_value\r\n\r\nOutputs:\r\n\r\ninfo = some_key: ${insert_here}\r\n```\r\n\r\n### Steps to Reproduce\r\n1. `terraform init`\r\n2. `terraform apply`\r\n"}}
{"actor":{"display_login":"dayglojesus"}}