{"action":"created","comment":{"url":"https://api.github.com/repos/giantswarm/aws-operator/pulls/comments/144776012","pull_request_review_id":69477695,"id":144776012,"diff_hunk":"@@ -1294,34 +1329,61 @@ func (s *Service) deleteFunc(obj interface{}) {\n \t\ts.logger.Log(\"error\", fmt.Sprintf(\"%#v\", err))\n \t}\n \n-\t// Delete gateway.\n-\tvar gateway resources.ResourceWithID\n-\tgateway = &awsresources.Gateway{\n+\tif key.HasClusterVersion(cluster) {\n+\t\t// Delete NAT gateway.\n+\t\tvar natGateway resources.ResourceWithID\n+\t\tnatGateway = &awsresources.NatGateway{\n+\t\t\tName: key.ClusterID(cluster),\n+\t\t\t// Dependencies.\n+\t\t\tLogger:    s.logger,\n+\t\t\tAWSEntity: awsresources.AWSEntity{Clients: clients},\n+\t\t}\n+\t\tif err := natGateway.Delete(); err != nil {\n+\t\t\ts.logger.Log(\"error\", fmt.Sprintf(\"could not delete nat gateway: '%#v'\", err))\n+\t\t} else {\n+\t\t\ts.logger.Log(\"info\", \"deleted nat gateway\")\n+\t\t}\n+\t}\n+\n+\t// Delete internet gateway.\n+\tvar internetGateway resources.ResourceWithID","path":"service/create/service.go","position":149,"original_position":149,"commit_id":"f1d76df986ca31d54d755040e087e7c29a618a71","original_commit_id":"f1d76df986ca31d54d755040e087e7c29a618a71","user":{"login":"fgimenez","id":70376,"avatar_url":"https://avatars2.githubusercontent.com/u/70376?v=4","gravatar_id":"","url":"https://api.github.com/users/fgimenez","html_url":"https://github.com/fgimenez","followers_url":"https://api.github.com/users/fgimenez/followers","following_url":"https://api.github.com/users/fgimenez/following{/other_user}","gists_url":"https://api.github.com/users/fgimenez/gists{/gist_id}","starred_url":"https://api.github.com/users/fgimenez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgimenez/subscriptions","organizations_url":"https://api.github.com/users/fgimenez/orgs","repos_url":"https://api.github.com/users/fgimenez/repos","events_url":"https://api.github.com/users/fgimenez/events{/privacy}","received_events_url":"https://api.github.com/users/fgimenez/received_events","type":"User","site_admin":false},"body":"Same as above about variable declaration.","created_at":"2017-10-16T07:57:23Z","updated_at":"2017-10-16T07:59:28Z","html_url":"https://github.com/giantswarm/aws-operator/pull/429#discussion_r144776012","pull_request_url":"https://api.github.com/repos/giantswarm/aws-operator/pulls/429","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/giantswarm/aws-operator/pulls/comments/144776012"},"html":{"href":"https://github.com/giantswarm/aws-operator/pull/429#discussion_r144776012"},"pull_request":{"href":"https://api.github.com/repos/giantswarm/aws-operator/pulls/429"}}},"pull_request":{"url":"https://api.github.com/repos/giantswarm/aws-operator/pulls/429","id":145740803,"html_url":"https://github.com/giantswarm/aws-operator/pull/429","diff_url":"https://github.com/giantswarm/aws-operator/pull/429.diff","patch_url":"https://github.com/giantswarm/aws-operator/pull/429.patch","issue_url":"https://api.github.com/repos/giantswarm/aws-operator/issues/429","number":429,"state":"open","locked":false,"title":"Create NAT gateway and private subnet","user":{"login":"rossf7","id":311527,"avatar_url":"https://avatars1.githubusercontent.com/u/311527?v=4","gravatar_id":"","url":"https://api.github.com/users/rossf7","html_url":"https://github.com/rossf7","followers_url":"https://api.github.com/users/rossf7/followers","following_url":"https://api.github.com/users/rossf7/following{/other_user}","gists_url":"https://api.github.com/users/rossf7/gists{/gist_id}","starred_url":"https://api.github.com/users/rossf7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossf7/subscriptions","organizations_url":"https://api.github.com/users/rossf7/orgs","repos_url":"https://api.github.com/users/rossf7/repos","events_url":"https://api.github.com/users/rossf7/events{/privacy}","received_events_url":"https://api.github.com/users/rossf7/received_events","type":"User","site_admin":false},"body":"Towards giantswarm/giantswarm#1803\r\n\r\nThis PR creates a NAT gateway and private subnet for clusters that have the cluster version set. This is in preparation for moving the workers to the private subnet and removing their public IPs.\r\n\r\n## Steps remaining\r\n\r\nThese steps will come in the next PR.\r\n\r\n- Create private route table\r\n- Create default routes for the internet and nat gateways\r\n- Use private route table for the private subnet\r\n- Don't associate public IPs in workers launch config\r\n\r\n\r\n","created_at":"2017-10-10T16:26:31Z","updated_at":"2017-10-16T07:59:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"038fb379a3246701840a6dbb3b91a34365646a02","assignee":{"login":"rossf7","id":311527,"avatar_url":"https://avatars1.githubusercontent.com/u/311527?v=4","gravatar_id":"","url":"https://api.github.com/users/rossf7","html_url":"https://github.com/rossf7","followers_url":"https://api.github.com/users/rossf7/followers","following_url":"https://api.github.com/users/rossf7/following{/other_user}","gists_url":"https://api.github.com/users/rossf7/gists{/gist_id}","starred_url":"https://api.github.com/users/rossf7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossf7/subscriptions","organizations_url":"https://api.github.com/users/rossf7/orgs","repos_url":"https://api.github.com/users/rossf7/repos","events_url":"https://api.github.com/users/rossf7/events{/privacy}","received_events_url":"https://api.github.com/users/rossf7/received_events","type":"User","site_admin":false},"assignees":[{"login":"rossf7","id":311527,"avatar_url":"https://avatars1.githubusercontent.com/u/311527?v=4","gravatar_id":"","url":"https://api.github.com/users/rossf7","html_url":"https://github.com/rossf7","followers_url":"https://api.github.com/users/rossf7/followers","following_url":"https://api.github.com/users/rossf7/following{/other_user}","gists_url":"https://api.github.com/users/rossf7/gists{/gist_id}","starred_url":"https://api.github.com/users/rossf7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossf7/subscriptions","organizations_url":"https://api.github.com/users/rossf7/orgs","repos_url":"https://api.github.com/users/rossf7/repos","events_url":"https://api.github.com/users/rossf7/events{/privacy}","received_events_url":"https://api.github.com/users/rossf7/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"puja108","id":5468872,"avatar_url":"https://avatars3.githubusercontent.com/u/5468872?v=4","gravatar_id":"","url":"https://api.github.com/users/puja108","html_url":"https://github.com/puja108","followers_url":"https://api.github.com/users/puja108/followers","following_url":"https://api.github.com/users/puja108/following{/other_user}","gists_url":"https://api.github.com/users/puja108/gists{/gist_id}","starred_url":"https://api.github.com/users/puja108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puja108/subscriptions","organizations_url":"https://api.github.com/users/puja108/orgs","repos_url":"https://api.github.com/users/puja108/repos","events_url":"https://api.github.com/users/puja108/events{/privacy}","received_events_url":"https://api.github.com/users/puja108/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/giantswarm/aws-operator/pulls/429/commits","review_comments_url":"https://api.github.com/repos/giantswarm/aws-operator/pulls/429/comments","review_comment_url":"https://api.github.com/repos/giantswarm/aws-operator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/giantswarm/aws-operator/issues/429/comments","statuses_url":"https://api.github.com/repos/giantswarm/aws-operator/statuses/f1d76df986ca31d54d755040e087e7c29a618a71","head":{"label":"giantswarm:gateways","ref":"gateways","sha":"f1d76df986ca31d54d755040e087e7c29a618a71","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":80619275,"name":"aws-operator","full_name":"giantswarm/aws-operator","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/aws-operator","description":"AWS operator creates/configure/manages Kubernetes clusters on AWS by using Giantnetes.","fork":false,"url":"https://api.github.com/repos/giantswarm/aws-operator","forks_url":"https://api.github.com/repos/giantswarm/aws-operator/forks","keys_url":"https://api.github.com/repos/giantswarm/aws-operator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/aws-operator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/aws-operator/teams","hooks_url":"https://api.github.com/repos/giantswarm/aws-operator/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/aws-operator/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/aws-operator/events","assignees_url":"https://api.github.com/repos/giantswarm/aws-operator/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/aws-operator/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/aws-operator/tags","blobs_url":"https://api.github.com/repos/giantswarm/aws-operator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/aws-operator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/aws-operator/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/aws-operator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/aws-operator/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/aws-operator/languages","stargazers_url":"https://api.github.com/repos/giantswarm/aws-operator/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/aws-operator/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/aws-operator/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/aws-operator/subscription","commits_url":"https://api.github.com/repos/giantswarm/aws-operator/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/aws-operator/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/aws-operator/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/aws-operator/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/aws-operator/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/aws-operator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/aws-operator/merges","archive_url":"https://api.github.com/repos/giantswarm/aws-operator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/aws-operator/downloads","issues_url":"https://api.github.com/repos/giantswarm/aws-operator/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/aws-operator/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/aws-operator/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/aws-operator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/aws-operator/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/aws-operator/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/aws-operator/deployments","created_at":"2017-02-01T12:47:41Z","updated_at":"2017-09-29T05:52:32Z","pushed_at":"2017-10-16T07:56:25Z","git_url":"git://github.com/giantswarm/aws-operator.git","ssh_url":"git@github.com:giantswarm/aws-operator.git","clone_url":"https://github.com/giantswarm/aws-operator.git","svn_url":"https://github.com/giantswarm/aws-operator","homepage":null,"size":31680,"stargazers_count":25,"watchers_count":25,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":23,"forks":6,"open_issues":23,"watchers":25,"default_branch":"master"}},"base":{"label":"giantswarm:master","ref":"master","sha":"59c7e3fc5c539c13ae8dcc7e4a73168925833937","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":80619275,"name":"aws-operator","full_name":"giantswarm/aws-operator","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/aws-operator","description":"AWS operator creates/configure/manages Kubernetes clusters on AWS by using Giantnetes.","fork":false,"url":"https://api.github.com/repos/giantswarm/aws-operator","forks_url":"https://api.github.com/repos/giantswarm/aws-operator/forks","keys_url":"https://api.github.com/repos/giantswarm/aws-operator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/aws-operator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/aws-operator/teams","hooks_url":"https://api.github.com/repos/giantswarm/aws-operator/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/aws-operator/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/aws-operator/events","assignees_url":"https://api.github.com/repos/giantswarm/aws-operator/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/aws-operator/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/aws-operator/tags","blobs_url":"https://api.github.com/repos/giantswarm/aws-operator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/aws-operator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/aws-operator/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/aws-operator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/aws-operator/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/aws-operator/languages","stargazers_url":"https://api.github.com/repos/giantswarm/aws-operator/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/aws-operator/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/aws-operator/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/aws-operator/subscription","commits_url":"https://api.github.com/repos/giantswarm/aws-operator/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/aws-operator/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/aws-operator/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/aws-operator/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/aws-operator/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/aws-operator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/aws-operator/merges","archive_url":"https://api.github.com/repos/giantswarm/aws-operator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/aws-operator/downloads","issues_url":"https://api.github.com/repos/giantswarm/aws-operator/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/aws-operator/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/aws-operator/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/aws-operator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/aws-operator/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/aws-operator/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/aws-operator/deployments","created_at":"2017-02-01T12:47:41Z","updated_at":"2017-09-29T05:52:32Z","pushed_at":"2017-10-16T07:56:25Z","git_url":"git://github.com/giantswarm/aws-operator.git","ssh_url":"git@github.com:giantswarm/aws-operator.git","clone_url":"https://github.com/giantswarm/aws-operator.git","svn_url":"https://github.com/giantswarm/aws-operator","homepage":null,"size":31680,"stargazers_count":25,"watchers_count":25,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":23,"forks":6,"open_issues":23,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/giantswarm/aws-operator/pulls/429"},"html":{"href":"https://github.com/giantswarm/aws-operator/pull/429"},"issue":{"href":"https://api.github.com/repos/giantswarm/aws-operator/issues/429"},"comments":{"href":"https://api.github.com/repos/giantswarm/aws-operator/issues/429/comments"},"review_comments":{"href":"https://api.github.com/repos/giantswarm/aws-operator/pulls/429/comments"},"review_comment":{"href":"https://api.github.com/repos/giantswarm/aws-operator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/giantswarm/aws-operator/pulls/429/commits"},"statuses":{"href":"https://api.github.com/repos/giantswarm/aws-operator/statuses/f1d76df986ca31d54d755040e087e7c29a618a71"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"fgimenez"}}