{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/comments/26833508","id":26833508,"diff_hunk":"@@ -105,6 +106,8 @@ def create\n       vpc_id = vpc_response.data.vpcs.first.vpc_id","path":"lib/puppet/provider/ec2_securitygroup/v2.rb","position":9,"original_position":9,"commit_id":"3d41eba3ec9772381636d0a4e1d2081ecf699948","original_commit_id":"1fd04e7483e465daafe767b29a45a48bb9aeaa5a","user":{"login":"garethr","id":2029,"avatar_url":"https://avatars.githubusercontent.com/u/2029?v=3","gravatar_id":"","url":"https://api.github.com/users/garethr","html_url":"https://github.com/garethr","followers_url":"https://api.github.com/users/garethr/followers","following_url":"https://api.github.com/users/garethr/following{/other_user}","gists_url":"https://api.github.com/users/garethr/gists{/gist_id}","starred_url":"https://api.github.com/users/garethr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethr/subscriptions","organizations_url":"https://api.github.com/users/garethr/orgs","repos_url":"https://api.github.com/users/garethr/repos","events_url":"https://api.github.com/users/garethr/events{/privacy}","received_events_url":"https://api.github.com/users/garethr/received_events","type":"User","site_admin":false},"body":"Added and pushed.","created_at":"2015-03-20T11:38:02Z","updated_at":"2015-03-20T11:38:02Z","html_url":"https://github.com/puppetlabs/puppetlabs-aws/pull/121#discussion_r26833508","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/121","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/comments/26833508"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-aws/pull/121#discussion_r26833508"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/121"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/121","id":31428580,"html_url":"https://github.com/puppetlabs/puppetlabs-aws/pull/121","diff_url":"https://github.com/puppetlabs/puppetlabs-aws/pull/121.diff","patch_url":"https://github.com/puppetlabs/puppetlabs-aws/pull/121.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/121","number":121,"state":"open","locked":false,"title":"(WIP, MAINT) Remove the additional query for VPC lookup for security groups","user":{"login":"garethr","id":2029,"avatar_url":"https://avatars.githubusercontent.com/u/2029?v=3","gravatar_id":"","url":"https://api.github.com/users/garethr","html_url":"https://github.com/garethr","followers_url":"https://api.github.com/users/garethr/followers","following_url":"https://api.github.com/users/garethr/following{/other_user}","gists_url":"https://api.github.com/users/garethr/gists{/gist_id}","starred_url":"https://api.github.com/users/garethr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethr/subscriptions","organizations_url":"https://api.github.com/users/garethr/orgs","repos_url":"https://api.github.com/users/garethr/repos","events_url":"https://api.github.com/users/garethr/events{/privacy}","received_events_url":"https://api.github.com/users/garethr/received_events","type":"User","site_admin":false},"body":"Security groups can only associate with those in the same VPC. See\r\nthe following gist for an example of what happens when you try:\r\n\r\nhttps://gist.github.com/garethr/81ef20bba61e89c037e6\r\n\r\nThat means it's only valid for the security group we're connecting with\r\nto have the same VPC id as the security group we're changing. So by\r\nstashing the vpc_id locally we can avoid the extra query to look it up.\r\n\r\nThis also accomodates VPCs in Classic accounts.","created_at":"2015-03-18T13:33:08Z","updated_at":"2015-03-20T11:38:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a2f5a7f60db3283c7382f118cd5ed837223aee8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/121/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/121/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/121/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/statuses/3d41eba3ec9772381636d0a4e1d2081ecf699948","head":{"label":"garethr:remove-additional-query-from-sg-lookup","ref":"remove-additional-query-from-sg-lookup","sha":"3d41eba3ec9772381636d0a4e1d2081ecf699948","user":{"login":"garethr","id":2029,"avatar_url":"https://avatars.githubusercontent.com/u/2029?v=3","gravatar_id":"","url":"https://api.github.com/users/garethr","html_url":"https://github.com/garethr","followers_url":"https://api.github.com/users/garethr/followers","following_url":"https://api.github.com/users/garethr/following{/other_user}","gists_url":"https://api.github.com/users/garethr/gists{/gist_id}","starred_url":"https://api.github.com/users/garethr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethr/subscriptions","organizations_url":"https://api.github.com/users/garethr/orgs","repos_url":"https://api.github.com/users/garethr/repos","events_url":"https://api.github.com/users/garethr/events{/privacy}","received_events_url":"https://api.github.com/users/garethr/received_events","type":"User","site_admin":false},"repo":{"id":24759357,"name":"puppetlabs-aws","full_name":"garethr/puppetlabs-aws","owner":{"login":"garethr","id":2029,"avatar_url":"https://avatars.githubusercontent.com/u/2029?v=3","gravatar_id":"","url":"https://api.github.com/users/garethr","html_url":"https://github.com/garethr","followers_url":"https://api.github.com/users/garethr/followers","following_url":"https://api.github.com/users/garethr/following{/other_user}","gists_url":"https://api.github.com/users/garethr/gists{/gist_id}","starred_url":"https://api.github.com/users/garethr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethr/subscriptions","organizations_url":"https://api.github.com/users/garethr/orgs","repos_url":"https://api.github.com/users/garethr/repos","events_url":"https://api.github.com/users/garethr/events{/privacy}","received_events_url":"https://api.github.com/users/garethr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/garethr/puppetlabs-aws","description":"Puppet module for managing AWS resources to build out infrastructure","fork":true,"url":"https://api.github.com/repos/garethr/puppetlabs-aws","forks_url":"https://api.github.com/repos/garethr/puppetlabs-aws/forks","keys_url":"https://api.github.com/repos/garethr/puppetlabs-aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/garethr/puppetlabs-aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/garethr/puppetlabs-aws/teams","hooks_url":"https://api.github.com/repos/garethr/puppetlabs-aws/hooks","issue_events_url":"https://api.github.com/repos/garethr/puppetlabs-aws/issues/events{/number}","events_url":"https://api.github.com/repos/garethr/puppetlabs-aws/events","assignees_url":"https://api.github.com/repos/garethr/puppetlabs-aws/assignees{/user}","branches_url":"https://api.github.com/repos/garethr/puppetlabs-aws/branches{/branch}","tags_url":"https://api.github.com/repos/garethr/puppetlabs-aws/tags","blobs_url":"https://api.github.com/repos/garethr/puppetlabs-aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/garethr/puppetlabs-aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/garethr/puppetlabs-aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/garethr/puppetlabs-aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/garethr/puppetlabs-aws/statuses/{sha}","languages_url":"https://api.github.com/repos/garethr/puppetlabs-aws/languages","stargazers_url":"https://api.github.com/repos/garethr/puppetlabs-aws/stargazers","contributors_url":"https://api.github.com/repos/garethr/puppetlabs-aws/contributors","subscribers_url":"https://api.github.com/repos/garethr/puppetlabs-aws/subscribers","subscription_url":"https://api.github.com/repos/garethr/puppetlabs-aws/subscription","commits_url":"https://api.github.com/repos/garethr/puppetlabs-aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/garethr/puppetlabs-aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/garethr/puppetlabs-aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/garethr/puppetlabs-aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/garethr/puppetlabs-aws/contents/{+path}","compare_url":"https://api.github.com/repos/garethr/puppetlabs-aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/garethr/puppetlabs-aws/merges","archive_url":"https://api.github.com/repos/garethr/puppetlabs-aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/garethr/puppetlabs-aws/downloads","issues_url":"https://api.github.com/repos/garethr/puppetlabs-aws/issues{/number}","pulls_url":"https://api.github.com/repos/garethr/puppetlabs-aws/pulls{/number}","milestones_url":"https://api.github.com/repos/garethr/puppetlabs-aws/milestones{/number}","notifications_url":"https://api.github.com/repos/garethr/puppetlabs-aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/garethr/puppetlabs-aws/labels{/name}","releases_url":"https://api.github.com/repos/garethr/puppetlabs-aws/releases{/id}","created_at":"2014-10-03T13:27:41Z","updated_at":"2015-03-16T10:48:36Z","pushed_at":"2015-03-20T11:37:44Z","git_url":"git://github.com/garethr/puppetlabs-aws.git","ssh_url":"git@github.com:garethr/puppetlabs-aws.git","clone_url":"https://github.com/garethr/puppetlabs-aws.git","svn_url":"https://github.com/garethr/puppetlabs-aws","homepage":"","size":1969,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"722ccfa5c0afa670348e887ed67e9e5f11aa09c0","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":23803367,"name":"puppetlabs-aws","full_name":"puppetlabs/puppetlabs-aws","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppetlabs-aws","description":"Puppet module for managing AWS resources to build out infrastructure","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws","forks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/releases{/id}","created_at":"2014-09-08T18:42:08Z","updated_at":"2015-03-18T02:32:54Z","pushed_at":"2015-03-20T11:37:45Z","git_url":"git://github.com/puppetlabs/puppetlabs-aws.git","ssh_url":"git@github.com:puppetlabs/puppetlabs-aws.git","clone_url":"https://github.com/puppetlabs/puppetlabs-aws.git","svn_url":"https://github.com/puppetlabs/puppetlabs-aws","homepage":"","size":3383,"stargazers_count":48,"watchers_count":48,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":30,"forks":21,"open_issues":30,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/121"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-aws/pull/121"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/121"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/121/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/121/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/pulls/121/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/statuses/3d41eba3ec9772381636d0a4e1d2081ecf699948"}}}}