{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/757","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/757/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/757/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/757/events","html_url":"https://github.com/hashicorp/terraform/issues/757","id":53741540,"number":757,"title":"GCE Error 400: Invalid value for field 'resource.metadata.items[1].key'","user":{"login":"errordeveloper","id":251467,"avatar_url":"https://avatars.githubusercontent.com/u/251467?v=3","gravatar_id":"","url":"https://api.github.com/users/errordeveloper","html_url":"https://github.com/errordeveloper","followers_url":"https://api.github.com/users/errordeveloper/followers","following_url":"https://api.github.com/users/errordeveloper/following{/other_user}","gists_url":"https://api.github.com/users/errordeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/errordeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/errordeveloper/subscriptions","organizations_url":"https://api.github.com/users/errordeveloper/orgs","repos_url":"https://api.github.com/users/errordeveloper/repos","events_url":"https://api.github.com/users/errordeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/errordeveloper/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/google-cloud","name":"provider/google-cloud","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-08T11:38:39Z","updated_at":"2015-01-23T23:43:32Z","closed_at":null,"body":"I am seeing this with 0.3.6.\r\n```\r\ngoogle_compute_instance.weave.1: Error: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.metadata.items[1].key': '#'.  Must be a match of regex '[a-zA-Z0-9-_]{1,128}', invalid\r\ngoogle_compute_instance.weave.2: Error: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.metadata.items[1].key': '#'.  Must be a match of regex '[a-zA-Z0-9-_]{1,128}', invalid\r\ngoogle_compute_instance.weave.0: Error: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.metadata.items[0].key': '#'.  Must be a match of regex '[a-zA-Z0-9-_]{1,128}', invalid\r\n```\r\n\r\nThis is how I pass metadata ([see entire configuration](https://github.com/errordeveloper/weave-demos/blob/a843a5c2f4b03b2cc597b29d0aa85adfa5be941a/terraform-example/infra/main.tf#L2-L52)):\r\n```\r\n    metadata {\r\n        user-data = \"${file(\"cloud-config.yaml\")}\"\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/71286057","html_url":"https://github.com/hashicorp/terraform/issues/757#issuecomment-71286057","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/757","id":71286057,"user":{"login":"svanharmelen","id":4171547,"avatar_url":"https://avatars.githubusercontent.com/u/4171547?v=3","gravatar_id":"","url":"https://api.github.com/users/svanharmelen","html_url":"https://github.com/svanharmelen","followers_url":"https://api.github.com/users/svanharmelen/followers","following_url":"https://api.github.com/users/svanharmelen/following{/other_user}","gists_url":"https://api.github.com/users/svanharmelen/gists{/gist_id}","starred_url":"https://api.github.com/users/svanharmelen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanharmelen/subscriptions","organizations_url":"https://api.github.com/users/svanharmelen/orgs","repos_url":"https://api.github.com/users/svanharmelen/repos","events_url":"https://api.github.com/users/svanharmelen/events{/privacy}","received_events_url":"https://api.github.com/users/svanharmelen/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T23:43:32Z","updated_at":"2015-01-23T23:43:32Z","body":"@mitchellh shouldn't this be considered to be a bug in core? As this is due to adding the count (#) attribute to maps. So if you now get the map and iterate over it, the pound sign will be one of the keys... For sets this works differently as the count is not actually saved in the set.\r\n\r\nI think maps should have the same behaviour and you should not contain the count in the returned/fetched map. What do you think?"}}