{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/28946805","id":28946805,"diff_hunk":"@@ -45,7 +47,11 @@ function get_vpc_id {\n }\n \n function get_subnet_id {\n-  python -c \"import json,sys; lst = [str(subnet['SubnetId']) for subnet in json.load(sys.stdin)['Subnets'] if subnet['VpcId'] == '$1']; print ''.join(lst)\"\n+  python -c \"import json,sys; lst = [str(subnet['SubnetId']) for subnet in json.load(sys.stdin)['Subnets'] if subnet['VpcId'] == '$1' and subnet['AvailabilityZone'] == '$2']; print ''.join(lst)\"","path":"cluster/aws/util.sh","position":16,"original_position":16,"commit_id":"1b55e8b4b7844a369f78264e7d7499266d8bac71","original_commit_id":"c9c7b29cea9705cab06289ef386367441288fcd9","user":{"login":"gust1n","id":234222,"avatar_url":"https://avatars.githubusercontent.com/u/234222?v=3","gravatar_id":"","url":"https://api.github.com/users/gust1n","html_url":"https://github.com/gust1n","followers_url":"https://api.github.com/users/gust1n/followers","following_url":"https://api.github.com/users/gust1n/following{/other_user}","gists_url":"https://api.github.com/users/gust1n/gists{/gist_id}","starred_url":"https://api.github.com/users/gust1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gust1n/subscriptions","organizations_url":"https://api.github.com/users/gust1n/orgs","repos_url":"https://api.github.com/users/gust1n/repos","events_url":"https://api.github.com/users/gust1n/events{/privacy}","received_events_url":"https://api.github.com/users/gust1n/received_events","type":"User","site_admin":false},"body":"Seems correct to me?","created_at":"2015-04-23T08:59:43Z","updated_at":"2015-04-23T08:59:43Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6606#discussion_r28946805","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6606","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/28946805"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6606#discussion_r28946805"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6606"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6606","id":32915083,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6606","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6606.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6606.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6606","number":6606,"state":"open","locked":false,"title":"AWS: Improving getting existing VPC and subnet","user":{"login":"gust1n","id":234222,"avatar_url":"https://avatars.githubusercontent.com/u/234222?v=3","gravatar_id":"","url":"https://api.github.com/users/gust1n","html_url":"https://github.com/gust1n","followers_url":"https://api.github.com/users/gust1n/followers","following_url":"https://api.github.com/users/gust1n/following{/other_user}","gists_url":"https://api.github.com/users/gust1n/gists{/gist_id}","starred_url":"https://api.github.com/users/gust1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gust1n/subscriptions","organizations_url":"https://api.github.com/users/gust1n/orgs","repos_url":"https://api.github.com/users/gust1n/repos","events_url":"https://api.github.com/users/gust1n/events{/privacy}","received_events_url":"https://api.github.com/users/gust1n/received_events","type":"User","site_admin":false},"body":"Had some troubles creating a default AWS Kubernetes cluster into an existing VPC with multiple subnets. Current code will unfortunately fetch all of them which ofc fails. This solution works for me, I'm open to suggestions on how to improve it.","created_at":"2015-04-09T00:18:41Z","updated_at":"2015-04-23T08:59:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ff8edd1098d38bb56916ba366909a2bbce51a4e","assignee":{"login":"brendandburns","id":5751682,"avatar_url":"https://avatars.githubusercontent.com/u/5751682?v=3","gravatar_id":"","url":"https://api.github.com/users/brendandburns","html_url":"https://github.com/brendandburns","followers_url":"https://api.github.com/users/brendandburns/followers","following_url":"https://api.github.com/users/brendandburns/following{/other_user}","gists_url":"https://api.github.com/users/brendandburns/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandburns/subscriptions","organizations_url":"https://api.github.com/users/brendandburns/orgs","repos_url":"https://api.github.com/users/brendandburns/repos","events_url":"https://api.github.com/users/brendandburns/events{/privacy}","received_events_url":"https://api.github.com/users/brendandburns/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6606/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6606/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6606/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/1b55e8b4b7844a369f78264e7d7499266d8bac71","head":{"label":"gust1n:aws-existing-vpc","ref":"aws-existing-vpc","sha":"1b55e8b4b7844a369f78264e7d7499266d8bac71","user":{"login":"gust1n","id":234222,"avatar_url":"https://avatars.githubusercontent.com/u/234222?v=3","gravatar_id":"","url":"https://api.github.com/users/gust1n","html_url":"https://github.com/gust1n","followers_url":"https://api.github.com/users/gust1n/followers","following_url":"https://api.github.com/users/gust1n/following{/other_user}","gists_url":"https://api.github.com/users/gust1n/gists{/gist_id}","starred_url":"https://api.github.com/users/gust1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gust1n/subscriptions","organizations_url":"https://api.github.com/users/gust1n/orgs","repos_url":"https://api.github.com/users/gust1n/repos","events_url":"https://api.github.com/users/gust1n/events{/privacy}","received_events_url":"https://api.github.com/users/gust1n/received_events","type":"User","site_admin":false},"repo":{"id":33638437,"name":"kubernetes","full_name":"gust1n/kubernetes","owner":{"login":"gust1n","id":234222,"avatar_url":"https://avatars.githubusercontent.com/u/234222?v=3","gravatar_id":"","url":"https://api.github.com/users/gust1n","html_url":"https://github.com/gust1n","followers_url":"https://api.github.com/users/gust1n/followers","following_url":"https://api.github.com/users/gust1n/following{/other_user}","gists_url":"https://api.github.com/users/gust1n/gists{/gist_id}","starred_url":"https://api.github.com/users/gust1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gust1n/subscriptions","organizations_url":"https://api.github.com/users/gust1n/orgs","repos_url":"https://api.github.com/users/gust1n/repos","events_url":"https://api.github.com/users/gust1n/events{/privacy}","received_events_url":"https://api.github.com/users/gust1n/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gust1n/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/gust1n/kubernetes","forks_url":"https://api.github.com/repos/gust1n/kubernetes/forks","keys_url":"https://api.github.com/repos/gust1n/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gust1n/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gust1n/kubernetes/teams","hooks_url":"https://api.github.com/repos/gust1n/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/gust1n/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/gust1n/kubernetes/events","assignees_url":"https://api.github.com/repos/gust1n/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/gust1n/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/gust1n/kubernetes/tags","blobs_url":"https://api.github.com/repos/gust1n/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gust1n/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gust1n/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/gust1n/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gust1n/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/gust1n/kubernetes/languages","stargazers_url":"https://api.github.com/repos/gust1n/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/gust1n/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/gust1n/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/gust1n/kubernetes/subscription","commits_url":"https://api.github.com/repos/gust1n/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/gust1n/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/gust1n/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/gust1n/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/gust1n/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/gust1n/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gust1n/kubernetes/merges","archive_url":"https://api.github.com/repos/gust1n/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gust1n/kubernetes/downloads","issues_url":"https://api.github.com/repos/gust1n/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/gust1n/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/gust1n/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/gust1n/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gust1n/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/gust1n/kubernetes/releases{/id}","created_at":"2015-04-08T23:50:01Z","updated_at":"2015-04-08T23:50:06Z","pushed_at":"2015-04-23T08:58:01Z","git_url":"git://github.com/gust1n/kubernetes.git","ssh_url":"git@github.com:gust1n/kubernetes.git","clone_url":"https://github.com/gust1n/kubernetes.git","svn_url":"https://github.com/gust1n/kubernetes","homepage":"http://kubernetes.io","size":42077,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"0a0bd88db6a5f195ce3a01fa9128a749a846fa6b","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-04-23T08:57:36Z","pushed_at":"2015-04-23T08:58:05Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":196839,"stargazers_count":7278,"watchers_count":7278,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1450,"mirror_url":null,"open_issues_count":930,"forks":1450,"open_issues":930,"watchers":7278,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6606"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6606"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6606"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6606/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6606/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6606/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/1b55e8b4b7844a369f78264e7d7499266d8bac71"}}}}