{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/17739","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/17739/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/17739/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/17739/events","html_url":"https://github.com/hashicorp/terraform/issues/17739","id":310058076,"number":17739,"title":"Provide `zone` as an exported attribute for google_compute_instance","user":{"login":"jarv","id":749175,"avatar_url":"https://avatars1.githubusercontent.com/u/749175?v=4","gravatar_id":"","url":"https://api.github.com/users/jarv","html_url":"https://github.com/jarv","followers_url":"https://api.github.com/users/jarv/followers","following_url":"https://api.github.com/users/jarv/following{/other_user}","gists_url":"https://api.github.com/users/jarv/gists{/gist_id}","starred_url":"https://api.github.com/users/jarv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarv/subscriptions","organizations_url":"https://api.github.com/users/jarv/orgs","repos_url":"https://api.github.com/users/jarv/repos","events_url":"https://api.github.com/users/jarv/events{/privacy}","received_events_url":"https://api.github.com/users/jarv/received_events","type":"User","site_admin":false},"labels":[{"id":135750563,"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/google-cloud","name":"provider/google-cloud","color":"bfdadc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-30T12:48:04Z","updated_at":"2018-03-30T14:20:02Z","closed_at":"2018-03-30T14:20:01Z","author_association":"NONE","body":"\r\n### Terraform Version\r\n```\r\n0.11.5\r\n```\r\n\r\n### Feature request for google provider\r\n\r\nProvide `zone` as an exported attribute\r\n\r\n### Use-case\r\n\r\nWhen creating google_compute_instance resources it is common to add the instances to multiple zones for redundancy. For example you may do something like:\r\n\r\n```\r\nzone = element(data.google_compute_zones.available.*.names, count.index)\r\n```\r\n\r\n\r\nIn order to dynamically add instnaces to instance groups however it is necessary to filter the list of instances by zone. This is because all instances that belong in an instance group must belong to the same zone. \r\n\r\nIn AWS this is possible with the [matchkeys()](https://www.terraform.io/docs/configuration/interpolation.html#matchkeys-values-keys-searchset-) but with google  it is not as only place where the zone information is exported is in the `self_link` which cannot be used in a filter.\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/377534219","html_url":"https://github.com/hashicorp/terraform/issues/17739#issuecomment-377534219","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/17739","id":377534219,"user":{"login":"hashibot[bot]","id":35615658,"avatar_url":"https://avatars2.githubusercontent.com/in/8332?v=4","gravatar_id":"","url":"https://api.github.com/users/hashibot%5Bbot%5D","html_url":"https://github.com/apps/hashibot","followers_url":"https://api.github.com/users/hashibot%5Bbot%5D/followers","following_url":"https://api.github.com/users/hashibot%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/hashibot%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/hashibot%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashibot%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/hashibot%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/hashibot%5Bbot%5D/repos","events_url":"https://api.github.com/users/hashibot%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/hashibot%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-03-30T14:20:02Z","updated_at":"2018-03-30T14:20:02Z","author_association":"NONE","body":"This issue has been automatically migrated to terraform-providers/terraform-provider-google#1275 because it looks like an issue with that provider. If you believe this is _not_ an issue with the provider, please reply to terraform-providers/terraform-provider-google#1275."}}
{"actor":{"display_login":"hashibot"}}