{"action":"created","comment":{"url":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/comments/85114752","pull_request_review_id":5848139,"id":85114752,"diff_hunk":"@@ -0,0 +1,98 @@\n+#lookup parameters for specic RDS types\n+variable \"ports\" {\n+  default = {\n+    mysql = \"3306\"\n+    oracle = \"1521\"\n+  }\n+}\n+\n+variable \"families\" {\n+  default = {\n+    mysql = \"mysql5.6\"\n+    oracle = \"oracle-se2-12.1\"\n+  }\n+}\n+\n+variable \"engines\" {\n+  default = {\n+    mysql = \"mysql\"\n+    oracle = \"oracle-se2\"\n+  }\n+}\n+\n+variable \"engine_versions\" {\n+  default = {\n+    mysql = \"5.6.22\"\n+    oracle = \"12.1.0.2.v2\"\n+  }\n+}\n+\n+# Create RDS with Subnet and paramter group,\n+resource \"aws_security_group\" \"sg_rds\" {\n+  name = \"sg_rds_${var.project}_${var.environment}${var.tag}\"\n+  description = \"Security group that is needed for the RDS\"\n+  vpc_id = \"${var.vpc_id}\"\n+\n+  ingress {\n+    from_port = \"${lookup(var.ports, var.rds_type)}\"\n+    to_port = \"${lookup(var.ports, var.rds_type)}\"\n+    protocol = \"tcp\"\n+    security_groups  = [\"${split(\",\", var.security_groups)}\"]\n+  }\n+\n+  tags {\n+    Name = \"${var.project}-${var.environment}${var.tag}-sg_rds\"\n+    Environment = \"${var.environment}\"\n+    Project = \"${var.project}\"\n+  }\n+}\n+\n+resource \"aws_db_subnet_group\" \"rds\" {\n+  name = \"${var.project}-${var.environment}${var.tag}-rds\"\n+  description = \"Our main group of subnets\"\n+  subnet_ids = [\"${var.subnets}\"]\n+}\n+\n+resource \"aws_db_parameter_group\" \"rds_mysql\" {\n+  name = \"mysql-rds-${var.project}-${var.environment}${var.tag}\"\n+  family = \"${lookup(var.families, \"mysql\")}\"\n+  description = \"rds ${var.project} ${var.environment} parameter group for mysql\"\n+  parameter = { name=\"slow_query_log\" value=\"1\" }","path":"rds/main.tf","position":60,"original_position":60,"commit_id":"00faccfa4569f12b377e51e26f1532e309c351c7","original_commit_id":"00faccfa4569f12b377e51e26f1532e309c351c7","user":{"login":"MattiasGees","id":2216724,"avatar_url":"https://avatars.githubusercontent.com/u/2216724?v=3","gravatar_id":"","url":"https://api.github.com/users/MattiasGees","html_url":"https://github.com/MattiasGees","followers_url":"https://api.github.com/users/MattiasGees/followers","following_url":"https://api.github.com/users/MattiasGees/following{/other_user}","gists_url":"https://api.github.com/users/MattiasGees/gists{/gist_id}","starred_url":"https://api.github.com/users/MattiasGees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattiasGees/subscriptions","organizations_url":"https://api.github.com/users/MattiasGees/orgs","repos_url":"https://api.github.com/users/MattiasGees/repos","events_url":"https://api.github.com/users/MattiasGees/events{/privacy}","received_events_url":"https://api.github.com/users/MattiasGees/received_events","type":"User","site_admin":false},"body":"Will these work with other databases than mysql?","created_at":"2016-10-26T12:54:39Z","updated_at":"2016-10-26T12:54:42Z","html_url":"https://github.com/skyscrapers/terraform-rds/pull/1#discussion_r85114752","pull_request_url":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/comments/85114752"},"html":{"href":"https://github.com/skyscrapers/terraform-rds/pull/1#discussion_r85114752"},"pull_request":{"href":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/1","id":90997757,"html_url":"https://github.com/skyscrapers/terraform-rds/pull/1","diff_url":"https://github.com/skyscrapers/terraform-rds/pull/1.diff","patch_url":"https://github.com/skyscrapers/terraform-rds/pull/1.patch","issue_url":"https://api.github.com/repos/skyscrapers/terraform-rds/issues/1","number":1,"state":"open","locked":false,"title":"initial setup","user":{"login":"simonrondelez","id":2873948,"avatar_url":"https://avatars.githubusercontent.com/u/2873948?v=3","gravatar_id":"","url":"https://api.github.com/users/simonrondelez","html_url":"https://github.com/simonrondelez","followers_url":"https://api.github.com/users/simonrondelez/followers","following_url":"https://api.github.com/users/simonrondelez/following{/other_user}","gists_url":"https://api.github.com/users/simonrondelez/gists{/gist_id}","starred_url":"https://api.github.com/users/simonrondelez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonrondelez/subscriptions","organizations_url":"https://api.github.com/users/simonrondelez/orgs","repos_url":"https://api.github.com/users/simonrondelez/repos","events_url":"https://api.github.com/users/simonrondelez/events{/privacy}","received_events_url":"https://api.github.com/users/simonrondelez/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-26T12:52:11Z","updated_at":"2016-10-26T12:54:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ab8020d3fa0c1a2c6e89f480e925d17acdb8cf2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/1/commits","review_comments_url":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/1/comments","review_comment_url":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/comments{/number}","comments_url":"https://api.github.com/repos/skyscrapers/terraform-rds/issues/1/comments","statuses_url":"https://api.github.com/repos/skyscrapers/terraform-rds/statuses/00faccfa4569f12b377e51e26f1532e309c351c7","head":{"label":"skyscrapers:initial","ref":"initial","sha":"00faccfa4569f12b377e51e26f1532e309c351c7","user":{"login":"skyscrapers","id":8297228,"avatar_url":"https://avatars.githubusercontent.com/u/8297228?v=3","gravatar_id":"","url":"https://api.github.com/users/skyscrapers","html_url":"https://github.com/skyscrapers","followers_url":"https://api.github.com/users/skyscrapers/followers","following_url":"https://api.github.com/users/skyscrapers/following{/other_user}","gists_url":"https://api.github.com/users/skyscrapers/gists{/gist_id}","starred_url":"https://api.github.com/users/skyscrapers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyscrapers/subscriptions","organizations_url":"https://api.github.com/users/skyscrapers/orgs","repos_url":"https://api.github.com/users/skyscrapers/repos","events_url":"https://api.github.com/users/skyscrapers/events{/privacy}","received_events_url":"https://api.github.com/users/skyscrapers/received_events","type":"Organization","site_admin":false},"repo":{"id":71997470,"name":"terraform-rds","full_name":"skyscrapers/terraform-rds","owner":{"login":"skyscrapers","id":8297228,"avatar_url":"https://avatars.githubusercontent.com/u/8297228?v=3","gravatar_id":"","url":"https://api.github.com/users/skyscrapers","html_url":"https://github.com/skyscrapers","followers_url":"https://api.github.com/users/skyscrapers/followers","following_url":"https://api.github.com/users/skyscrapers/following{/other_user}","gists_url":"https://api.github.com/users/skyscrapers/gists{/gist_id}","starred_url":"https://api.github.com/users/skyscrapers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyscrapers/subscriptions","organizations_url":"https://api.github.com/users/skyscrapers/orgs","repos_url":"https://api.github.com/users/skyscrapers/repos","events_url":"https://api.github.com/users/skyscrapers/events{/privacy}","received_events_url":"https://api.github.com/users/skyscrapers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/skyscrapers/terraform-rds","description":null,"fork":false,"url":"https://api.github.com/repos/skyscrapers/terraform-rds","forks_url":"https://api.github.com/repos/skyscrapers/terraform-rds/forks","keys_url":"https://api.github.com/repos/skyscrapers/terraform-rds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skyscrapers/terraform-rds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skyscrapers/terraform-rds/teams","hooks_url":"https://api.github.com/repos/skyscrapers/terraform-rds/hooks","issue_events_url":"https://api.github.com/repos/skyscrapers/terraform-rds/issues/events{/number}","events_url":"https://api.github.com/repos/skyscrapers/terraform-rds/events","assignees_url":"https://api.github.com/repos/skyscrapers/terraform-rds/assignees{/user}","branches_url":"https://api.github.com/repos/skyscrapers/terraform-rds/branches{/branch}","tags_url":"https://api.github.com/repos/skyscrapers/terraform-rds/tags","blobs_url":"https://api.github.com/repos/skyscrapers/terraform-rds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skyscrapers/terraform-rds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skyscrapers/terraform-rds/git/refs{/sha}","trees_url":"https://api.github.com/repos/skyscrapers/terraform-rds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skyscrapers/terraform-rds/statuses/{sha}","languages_url":"https://api.github.com/repos/skyscrapers/terraform-rds/languages","stargazers_url":"https://api.github.com/repos/skyscrapers/terraform-rds/stargazers","contributors_url":"https://api.github.com/repos/skyscrapers/terraform-rds/contributors","subscribers_url":"https://api.github.com/repos/skyscrapers/terraform-rds/subscribers","subscription_url":"https://api.github.com/repos/skyscrapers/terraform-rds/subscription","commits_url":"https://api.github.com/repos/skyscrapers/terraform-rds/commits{/sha}","git_commits_url":"https://api.github.com/repos/skyscrapers/terraform-rds/git/commits{/sha}","comments_url":"https://api.github.com/repos/skyscrapers/terraform-rds/comments{/number}","issue_comment_url":"https://api.github.com/repos/skyscrapers/terraform-rds/issues/comments{/number}","contents_url":"https://api.github.com/repos/skyscrapers/terraform-rds/contents/{+path}","compare_url":"https://api.github.com/repos/skyscrapers/terraform-rds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skyscrapers/terraform-rds/merges","archive_url":"https://api.github.com/repos/skyscrapers/terraform-rds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skyscrapers/terraform-rds/downloads","issues_url":"https://api.github.com/repos/skyscrapers/terraform-rds/issues{/number}","pulls_url":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls{/number}","milestones_url":"https://api.github.com/repos/skyscrapers/terraform-rds/milestones{/number}","notifications_url":"https://api.github.com/repos/skyscrapers/terraform-rds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skyscrapers/terraform-rds/labels{/name}","releases_url":"https://api.github.com/repos/skyscrapers/terraform-rds/releases{/id}","deployments_url":"https://api.github.com/repos/skyscrapers/terraform-rds/deployments","created_at":"2016-10-26T11:41:52Z","updated_at":"2016-10-26T11:41:52Z","pushed_at":"2016-10-26T12:52:11Z","git_url":"git://github.com/skyscrapers/terraform-rds.git","ssh_url":"git@github.com:skyscrapers/terraform-rds.git","clone_url":"https://github.com/skyscrapers/terraform-rds.git","svn_url":"https://github.com/skyscrapers/terraform-rds","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"skyscrapers:master","ref":"master","sha":"e33c602684fcaeeb7e4c406330135fba1de3a391","user":{"login":"skyscrapers","id":8297228,"avatar_url":"https://avatars.githubusercontent.com/u/8297228?v=3","gravatar_id":"","url":"https://api.github.com/users/skyscrapers","html_url":"https://github.com/skyscrapers","followers_url":"https://api.github.com/users/skyscrapers/followers","following_url":"https://api.github.com/users/skyscrapers/following{/other_user}","gists_url":"https://api.github.com/users/skyscrapers/gists{/gist_id}","starred_url":"https://api.github.com/users/skyscrapers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyscrapers/subscriptions","organizations_url":"https://api.github.com/users/skyscrapers/orgs","repos_url":"https://api.github.com/users/skyscrapers/repos","events_url":"https://api.github.com/users/skyscrapers/events{/privacy}","received_events_url":"https://api.github.com/users/skyscrapers/received_events","type":"Organization","site_admin":false},"repo":{"id":71997470,"name":"terraform-rds","full_name":"skyscrapers/terraform-rds","owner":{"login":"skyscrapers","id":8297228,"avatar_url":"https://avatars.githubusercontent.com/u/8297228?v=3","gravatar_id":"","url":"https://api.github.com/users/skyscrapers","html_url":"https://github.com/skyscrapers","followers_url":"https://api.github.com/users/skyscrapers/followers","following_url":"https://api.github.com/users/skyscrapers/following{/other_user}","gists_url":"https://api.github.com/users/skyscrapers/gists{/gist_id}","starred_url":"https://api.github.com/users/skyscrapers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyscrapers/subscriptions","organizations_url":"https://api.github.com/users/skyscrapers/orgs","repos_url":"https://api.github.com/users/skyscrapers/repos","events_url":"https://api.github.com/users/skyscrapers/events{/privacy}","received_events_url":"https://api.github.com/users/skyscrapers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/skyscrapers/terraform-rds","description":null,"fork":false,"url":"https://api.github.com/repos/skyscrapers/terraform-rds","forks_url":"https://api.github.com/repos/skyscrapers/terraform-rds/forks","keys_url":"https://api.github.com/repos/skyscrapers/terraform-rds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skyscrapers/terraform-rds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skyscrapers/terraform-rds/teams","hooks_url":"https://api.github.com/repos/skyscrapers/terraform-rds/hooks","issue_events_url":"https://api.github.com/repos/skyscrapers/terraform-rds/issues/events{/number}","events_url":"https://api.github.com/repos/skyscrapers/terraform-rds/events","assignees_url":"https://api.github.com/repos/skyscrapers/terraform-rds/assignees{/user}","branches_url":"https://api.github.com/repos/skyscrapers/terraform-rds/branches{/branch}","tags_url":"https://api.github.com/repos/skyscrapers/terraform-rds/tags","blobs_url":"https://api.github.com/repos/skyscrapers/terraform-rds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skyscrapers/terraform-rds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skyscrapers/terraform-rds/git/refs{/sha}","trees_url":"https://api.github.com/repos/skyscrapers/terraform-rds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skyscrapers/terraform-rds/statuses/{sha}","languages_url":"https://api.github.com/repos/skyscrapers/terraform-rds/languages","stargazers_url":"https://api.github.com/repos/skyscrapers/terraform-rds/stargazers","contributors_url":"https://api.github.com/repos/skyscrapers/terraform-rds/contributors","subscribers_url":"https://api.github.com/repos/skyscrapers/terraform-rds/subscribers","subscription_url":"https://api.github.com/repos/skyscrapers/terraform-rds/subscription","commits_url":"https://api.github.com/repos/skyscrapers/terraform-rds/commits{/sha}","git_commits_url":"https://api.github.com/repos/skyscrapers/terraform-rds/git/commits{/sha}","comments_url":"https://api.github.com/repos/skyscrapers/terraform-rds/comments{/number}","issue_comment_url":"https://api.github.com/repos/skyscrapers/terraform-rds/issues/comments{/number}","contents_url":"https://api.github.com/repos/skyscrapers/terraform-rds/contents/{+path}","compare_url":"https://api.github.com/repos/skyscrapers/terraform-rds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skyscrapers/terraform-rds/merges","archive_url":"https://api.github.com/repos/skyscrapers/terraform-rds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skyscrapers/terraform-rds/downloads","issues_url":"https://api.github.com/repos/skyscrapers/terraform-rds/issues{/number}","pulls_url":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls{/number}","milestones_url":"https://api.github.com/repos/skyscrapers/terraform-rds/milestones{/number}","notifications_url":"https://api.github.com/repos/skyscrapers/terraform-rds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skyscrapers/terraform-rds/labels{/name}","releases_url":"https://api.github.com/repos/skyscrapers/terraform-rds/releases{/id}","deployments_url":"https://api.github.com/repos/skyscrapers/terraform-rds/deployments","created_at":"2016-10-26T11:41:52Z","updated_at":"2016-10-26T11:41:52Z","pushed_at":"2016-10-26T12:52:11Z","git_url":"git://github.com/skyscrapers/terraform-rds.git","ssh_url":"git@github.com:skyscrapers/terraform-rds.git","clone_url":"https://github.com/skyscrapers/terraform-rds.git","svn_url":"https://github.com/skyscrapers/terraform-rds","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/1"},"html":{"href":"https://github.com/skyscrapers/terraform-rds/pull/1"},"issue":{"href":"https://api.github.com/repos/skyscrapers/terraform-rds/issues/1"},"comments":{"href":"https://api.github.com/repos/skyscrapers/terraform-rds/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/skyscrapers/terraform-rds/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/skyscrapers/terraform-rds/statuses/00faccfa4569f12b377e51e26f1532e309c351c7"}}}}
{"actor":{"display_login":"MattiasGees"}}