{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/govuk-aws/pulls/comments/169921109","pull_request_review_id":98523372,"id":169921109,"diff_hunk":"@@ -0,0 +1,114 @@\n+#\n+# == Manifest: Project: Security Groups: email-alert-api\n+#\n+# The email-alert-api needs to be accessible on ports:\n+#   - 443 from the other VMs\n+#\n+# === Variables:\n+# stackname - string\n+#\n+# === Outputs:\n+#\n+# sg_email-alert-api_internal_id\n+# sg_email-alert-api_elb_internal_id\n+# sg_email-alert-api_external_id\n+# sg_email-alert-api_elb_external_id\n+#\n+resource \"aws_security_group\" \"email-alert-api\" {\n+  name        = \"${var.stackname}_email-alert-api_access\"\n+  vpc_id      = \"${data.terraform_remote_state.infra_vpc.vpc_id}\"\n+  description = \"Access to the email-alert-api host from its ELB\"\n+\n+  tags {\n+    Name = \"${var.stackname}_email-alert-api_access\"\n+  }\n+}\n+\n+resource \"aws_security_group_rule\" \"email-alert-api_ingress_email-alert-api-elb-internal_http\" {\n+  type      = \"ingress\"\n+  from_port = 80\n+  to_port   = 80\n+  protocol  = \"tcp\"\n+\n+  # Which security group is the rule assigned to\n+  security_group_id = \"${aws_security_group.email-alert-api.id}\"\n+\n+  # Which security group can use this rule\n+  source_security_group_id = \"${aws_security_group.email-alert-api_elb_internal.id}\"\n+}\n+\n+resource \"aws_security_group_rule\" \"email-alert-api_ingress_email-alert-api-elb-external_http\" {\n+  type      = \"ingress\"\n+  from_port = 80\n+  to_port   = 80\n+  protocol  = \"tcp\"\n+\n+  # Which security group is the rule assigned to\n+  security_group_id = \"${aws_security_group.email-alert-api.id}\"\n+\n+  # Which security group can use this rule\n+  source_security_group_id = \"${aws_security_group.email-alert-api_elb_external.id}\"\n+}\n+\n+resource \"aws_security_group\" \"email-alert-api_elb_internal\" {\n+  name        = \"${var.stackname}_email-alert-api_elb_internal_access\"\n+  vpc_id      = \"${data.terraform_remote_state.infra_vpc.vpc_id}\"\n+  description = \"Access the email-alert-api ELB\"\n+\n+  tags {\n+    Name = \"${var.stackname}_email-alert-api_elb_access\"\n+  }\n+}\n+\n+# TODO: Audit\n+resource \"aws_security_group_rule\" \"email-alert-api-elb-internal_ingress_management_https\" {","path":"terraform/projects/infra-security-groups/email-alert-api.tf","position":64,"original_position":64,"commit_id":"c79ce1814af98a9ae4d23715ff7f14260ba0e907","original_commit_id":"c79ce1814af98a9ae4d23715ff7f14260ba0e907","user":{"login":"surminus","id":5610276,"avatar_url":"https://avatars0.githubusercontent.com/u/5610276?v=4","gravatar_id":"","url":"https://api.github.com/users/surminus","html_url":"https://github.com/surminus","followers_url":"https://api.github.com/users/surminus/followers","following_url":"https://api.github.com/users/surminus/following{/other_user}","gists_url":"https://api.github.com/users/surminus/gists{/gist_id}","starred_url":"https://api.github.com/users/surminus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surminus/subscriptions","organizations_url":"https://api.github.com/users/surminus/orgs","repos_url":"https://api.github.com/users/surminus/repos","events_url":"https://api.github.com/users/surminus/events{/privacy}","received_events_url":"https://api.github.com/users/surminus/received_events","type":"User","site_admin":false},"body":"If we can open up the internal load balancer to specific instances that would be useful, and then we have the external facing load balancer for the API endpoint. ","created_at":"2018-02-22T10:59:23Z","updated_at":"2018-02-22T10:59:23Z","html_url":"https://github.com/alphagov/govuk-aws/pull/494#discussion_r169921109","pull_request_url":"https://api.github.com/repos/alphagov/govuk-aws/pulls/494","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/alphagov/govuk-aws/pulls/comments/169921109"},"html":{"href":"https://github.com/alphagov/govuk-aws/pull/494#discussion_r169921109"},"pull_request":{"href":"https://api.github.com/repos/alphagov/govuk-aws/pulls/494"}},"in_reply_to_id":169659106},"pull_request":{"url":"https://api.github.com/repos/alphagov/govuk-aws/pulls/494","id":170465937,"html_url":"https://github.com/alphagov/govuk-aws/pull/494","diff_url":"https://github.com/alphagov/govuk-aws/pull/494.diff","patch_url":"https://github.com/alphagov/govuk-aws/pull/494.patch","issue_url":"https://api.github.com/repos/alphagov/govuk-aws/issues/494","number":494,"state":"open","locked":false,"title":"Add new machines for email-alert-api","user":{"login":"rubenarakelyan","id":444232,"avatar_url":"https://avatars0.githubusercontent.com/u/444232?v=4","gravatar_id":"","url":"https://api.github.com/users/rubenarakelyan","html_url":"https://github.com/rubenarakelyan","followers_url":"https://api.github.com/users/rubenarakelyan/followers","following_url":"https://api.github.com/users/rubenarakelyan/following{/other_user}","gists_url":"https://api.github.com/users/rubenarakelyan/gists{/gist_id}","starred_url":"https://api.github.com/users/rubenarakelyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubenarakelyan/subscriptions","organizations_url":"https://api.github.com/users/rubenarakelyan/orgs","repos_url":"https://api.github.com/users/rubenarakelyan/repos","events_url":"https://api.github.com/users/rubenarakelyan/events{/privacy}","received_events_url":"https://api.github.com/users/rubenarakelyan/received_events","type":"User","site_admin":false},"body":"This commit adds new machines for email-alert-api to AWS.\r\n\r\nWe're adding these new machines since email-alert-api is using the majority of resources on the current backend machines and we'd like to give it space as well as reduce any possible impact on other backend apps. This is a result of the work to migrate all email sending to our own systems.\r\n\r\nTrello: https://trello.com/c/oqi6Xvnu/629-move-email-alert-api-and-email-alert-service-to-dedicated-vms","created_at":"2018-02-21T13:13:09Z","updated_at":"2018-02-22T10:59:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8e10b5e675afd9cbb2807b80d5514c4bd151fdb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/govuk-aws/pulls/494/commits","review_comments_url":"https://api.github.com/repos/alphagov/govuk-aws/pulls/494/comments","review_comment_url":"https://api.github.com/repos/alphagov/govuk-aws/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/govuk-aws/issues/494/comments","statuses_url":"https://api.github.com/repos/alphagov/govuk-aws/statuses/c79ce1814af98a9ae4d23715ff7f14260ba0e907","head":{"label":"alphagov:add-new-email-alert-api-machines","ref":"add-new-email-alert-api-machines","sha":"c79ce1814af98a9ae4d23715ff7f14260ba0e907","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":95886610,"name":"govuk-aws","full_name":"alphagov/govuk-aws","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govuk-aws","description":"The GOV.UK repository for our Migration to AWS","fork":false,"url":"https://api.github.com/repos/alphagov/govuk-aws","forks_url":"https://api.github.com/repos/alphagov/govuk-aws/forks","keys_url":"https://api.github.com/repos/alphagov/govuk-aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk-aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk-aws/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk-aws/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk-aws/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk-aws/events","assignees_url":"https://api.github.com/repos/alphagov/govuk-aws/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk-aws/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk-aws/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk-aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk-aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk-aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk-aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk-aws/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk-aws/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk-aws/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk-aws/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk-aws/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk-aws/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk-aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk-aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk-aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk-aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk-aws/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk-aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk-aws/merges","archive_url":"https://api.github.com/repos/alphagov/govuk-aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk-aws/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk-aws/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk-aws/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk-aws/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk-aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk-aws/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk-aws/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govuk-aws/deployments","created_at":"2017-06-30T12:31:43Z","updated_at":"2018-02-20T14:00:28Z","pushed_at":"2018-02-22T10:53:36Z","git_url":"git://github.com/alphagov/govuk-aws.git","ssh_url":"git@github.com:alphagov/govuk-aws.git","clone_url":"https://github.com/alphagov/govuk-aws.git","svn_url":"https://github.com/alphagov/govuk-aws","homepage":null,"size":7463,"stargazers_count":50,"watchers_count":50,"language":"HCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":6,"open_issues":7,"watchers":50,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"4163d844e350bd6d46f5bb1ddd98fbd26050a169","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":95886610,"name":"govuk-aws","full_name":"alphagov/govuk-aws","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govuk-aws","description":"The GOV.UK repository for our Migration to AWS","fork":false,"url":"https://api.github.com/repos/alphagov/govuk-aws","forks_url":"https://api.github.com/repos/alphagov/govuk-aws/forks","keys_url":"https://api.github.com/repos/alphagov/govuk-aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk-aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk-aws/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk-aws/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk-aws/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk-aws/events","assignees_url":"https://api.github.com/repos/alphagov/govuk-aws/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk-aws/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk-aws/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk-aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk-aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk-aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk-aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk-aws/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk-aws/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk-aws/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk-aws/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk-aws/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk-aws/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk-aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk-aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk-aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk-aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk-aws/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk-aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk-aws/merges","archive_url":"https://api.github.com/repos/alphagov/govuk-aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk-aws/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk-aws/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk-aws/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk-aws/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk-aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk-aws/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk-aws/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govuk-aws/deployments","created_at":"2017-06-30T12:31:43Z","updated_at":"2018-02-20T14:00:28Z","pushed_at":"2018-02-22T10:53:36Z","git_url":"git://github.com/alphagov/govuk-aws.git","ssh_url":"git@github.com:alphagov/govuk-aws.git","clone_url":"https://github.com/alphagov/govuk-aws.git","svn_url":"https://github.com/alphagov/govuk-aws","homepage":null,"size":7463,"stargazers_count":50,"watchers_count":50,"language":"HCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":6,"open_issues":7,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/govuk-aws/pulls/494"},"html":{"href":"https://github.com/alphagov/govuk-aws/pull/494"},"issue":{"href":"https://api.github.com/repos/alphagov/govuk-aws/issues/494"},"comments":{"href":"https://api.github.com/repos/alphagov/govuk-aws/issues/494/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/govuk-aws/pulls/494/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/govuk-aws/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/govuk-aws/pulls/494/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/govuk-aws/statuses/c79ce1814af98a9ae4d23715ff7f14260ba0e907"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"surminus"}}