{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/9897","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/9897/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/9897/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/9897/events","html_url":"https://github.com/hashicorp/terraform/issues/9897","id":187465041,"number":9897,"title":"rendering templates broke between 0.7.5 and 0.7.9","user":{"login":"buzztroll","id":234331,"avatar_url":"https://avatars.githubusercontent.com/u/234331?v=3","gravatar_id":"","url":"https://api.github.com/users/buzztroll","html_url":"https://github.com/buzztroll","followers_url":"https://api.github.com/users/buzztroll/followers","following_url":"https://api.github.com/users/buzztroll/following{/other_user}","gists_url":"https://api.github.com/users/buzztroll/gists{/gist_id}","starred_url":"https://api.github.com/users/buzztroll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buzztroll/subscriptions","organizations_url":"https://api.github.com/users/buzztroll/orgs","repos_url":"https://api.github.com/users/buzztroll/repos","events_url":"https://api.github.com/users/buzztroll/events{/privacy}","received_events_url":"https://api.github.com/users/buzztroll/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-05T00:29:50Z","updated_at":"2016-11-07T13:41:59Z","closed_at":null,"body":"Here is a sample config file where I see the difference:\r\n\r\n```\r\ndata \"template_file\" \"host\" {\r\n  count = 3\r\n  template = \"${host}:2181\"\r\n  vars {\r\n    host = \"SOMENAME${count.index}\"\r\n  }\r\n}\r\n\r\ndata \"template_file\" \"combined\" {\r\n  template = \"${zk_servers}\"\r\n  vars {\r\n    zk_servers = \"${join(\",\", data.template_file.host.*.rendered)}\"\r\n  }\r\n}\r\n\r\noutput \"out\" {\r\n  value = \"${data.template_file.combined.rendered}\"\r\n}\r\n```\r\n\r\nHere is the output from 0.7.5 (which is what is expected):\r\n\r\n```\r\ndata.template_file.host.2: Refreshing state...\r\ndata.template_file.host.1: Refreshing state...\r\ndata.template_file.host.0: Refreshing state...\r\ndata.template_file.combined: Refreshing state...\r\n\r\nApply complete! Resources: 0 added, 0 changed, 0 destroyed.\r\n\r\nOutputs:\r\n\r\nout = SOMENAME0:2181,SOMENAME1:2181,SOMENAME2:2181\r\n```\r\n\r\nAnd here is the output from 0.7.9\r\n\r\n```\r\ndata.template_file.host.1: Refreshing state...\r\ndata.template_file.host.0: Refreshing state...\r\ndata.template_file.host.2: Refreshing state...\r\ndata.template_file.combined: Refreshing state...\r\n\r\nApply complete! Resources: 0 added, 0 changed, 0 destroyed.\r\n\r\nOutputs:\r\n\r\nout =\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/258838095","html_url":"https://github.com/hashicorp/terraform/issues/9897#issuecomment-258838095","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/9897","id":258838095,"user":{"login":"antimack","id":7837451,"avatar_url":"https://avatars.githubusercontent.com/u/7837451?v=3","gravatar_id":"","url":"https://api.github.com/users/antimack","html_url":"https://github.com/antimack","followers_url":"https://api.github.com/users/antimack/followers","following_url":"https://api.github.com/users/antimack/following{/other_user}","gists_url":"https://api.github.com/users/antimack/gists{/gist_id}","starred_url":"https://api.github.com/users/antimack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antimack/subscriptions","organizations_url":"https://api.github.com/users/antimack/orgs","repos_url":"https://api.github.com/users/antimack/repos","events_url":"https://api.github.com/users/antimack/events{/privacy}","received_events_url":"https://api.github.com/users/antimack/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T13:41:59Z","updated_at":"2016-11-07T13:41:59Z","body":"+1, for me template_file resource is broken both on 0.7.8 and 0.7.9 as well, I'm using template_file to create a policy for iam_roles for AWS Beanstalk environments both on staging and production, with 0.7.8 and 0.7.9 \"plan\" command shows \"computed\" in policy and I had an error:\r\n* aws_iam_role_policy.iam_role_policy: Error putting IAM role policy xxxxxxxxxxxxxxxxx: InvalidParameter: 1 validation error(s) found.\r\n- minimum field size of 1, PutRolePolicyInput.PolicyDocument.\r\n\r\nAlso tried to switch from resource to \"data\" type but in that case both for 0.7.8. and 0.7.9 terraform just stuck on creating iam_role.\r\nAfter reverting to 0.7.4 everything works like it should."}}
{"actor":{"display_login":"antimack"}}