{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/13612","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13612/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13612/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13612/events","html_url":"https://github.com/elastic/elasticsearch/pull/13612","id":106749424,"number":13612,"title":"Add `_gce_` network host setting","user":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Plugin%20Cloud%20GCE","name":":Plugin Cloud GCE","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/feature","name":"feature","color":"328a58"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/review","name":"review","color":"0052cc"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v2.0.0","name":"v2.0.0","color":"dddddd"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v2.1.0","name":"v2.1.0","color":"dddddd"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v3.0.0","name":"v3.0.0","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-16T10:59:41Z","updated_at":"2015-09-26T16:38:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/13612","html_url":"https://github.com/elastic/elasticsearch/pull/13612","diff_url":"https://github.com/elastic/elasticsearch/pull/13612.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/13612.patch"},"body":"When running in GCE platform, an instance has access to:\r\n\r\nhttp://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip\r\n\r\nWhich gives back the private IP address, for example `10.240.0.2`.\r\n\r\nhttp://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/externalIp\r\n\r\nGives back the public Ip address, for example `130.211.108.21`.\r\n\r\nAs we have for `ec2`, we can support new network host settings:\r\n\r\n* `_gce:privateIp_`: maps to `ip`\r\n* `_gce:publicIp_`: maps to `externalIp`\r\n* `_gce_` shorter version for `_gce:privateIp_`\r\n\r\nCloses #13605.\r\nCloses #13590."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/143468906","html_url":"https://github.com/elastic/elasticsearch/pull/13612#issuecomment-143468906","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13612","id":143468906,"user":{"login":"bleskes","id":1006375,"avatar_url":"https://avatars.githubusercontent.com/u/1006375?v=3","gravatar_id":"","url":"https://api.github.com/users/bleskes","html_url":"https://github.com/bleskes","followers_url":"https://api.github.com/users/bleskes/followers","following_url":"https://api.github.com/users/bleskes/following{/other_user}","gists_url":"https://api.github.com/users/bleskes/gists{/gist_id}","starred_url":"https://api.github.com/users/bleskes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleskes/subscriptions","organizations_url":"https://api.github.com/users/bleskes/orgs","repos_url":"https://api.github.com/users/bleskes/repos","events_url":"https://api.github.com/users/bleskes/events{/privacy}","received_events_url":"https://api.github.com/users/bleskes/received_events","type":"User","site_admin":false},"created_at":"2015-09-26T16:38:58Z","updated_at":"2015-09-26T16:38:58Z","body":"Thx David for implementing this. I left some comments. My biggest concern is that we are hard wired to to the first 0 interface. I glimpsed the doc and could find this to be guaranteed by google. Does it? If so, we need to document what we do. If not, we need to retrieve all of the interfaces and chose the first (in a predictable order) and document that."}}