{"action":"created","comment":{"url":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/comments/167235518","pull_request_review_id":95429579,"id":167235518,"diff_hunk":"@@ -49,3 +49,30 @@ module \"cloudtrail-s3\" {\n EOF\n }\n ```\n+\n+## cwlogs-to-es\n+Module to ship AWS Cloudwatch logs to AWS Elasticsearch. This assumes that your AWS Elasticsearch is running inside a VPC and your Lambda will be deployed inside that VPC. The needed IAM rights + securitygroups and rules are created. To make this work, you need to choose a subnet that has access to the AWS elasticsearch service.\n+\n+### Variables\n+\n+* [`elasticsearch_sg_id`]: String(required): Security group ID of the AWS elasticsearch service.\n+* [`elasticsearch_dns`]: String(required): Elasticsearch DNS hostname\n+* [`environment`]: String(required): the name of the environment these subnets belong to (prod,stag,dev)\n+* [`subnet_ids`]: List(required): Subnet IDs you want to deploy the lambda in\n+* [`log_group_name`]: String(required): Cloudwatch logs loggroup name to use\n+* [`aws_account_id`]: String(optional): Your AWS account ID. Default to your current AWS account\n+* [`aws_region`]: String(optional): AWS region where you have your AWS cloudwtach loggroup deployed in. Defaults to your current region\n+\n+### Example\n+\n+```\n+module \"cwlogs-to-es\" {\n+  source               = \"github.com/skyscrapers/terraform-logging/cwlogs-to-es\"\n+  #elasticsearch_sg_id = \"${module.logs.sg_id}\"","path":"README.md","position":23,"original_position":23,"commit_id":"d6da9f1cdddd243bf34df5e46c70008b3fca4320","original_commit_id":"d6da9f1cdddd243bf34df5e46c70008b3fca4320","user":{"login":"duboisph","id":33081,"avatar_url":"https://avatars1.githubusercontent.com/u/33081?v=4","gravatar_id":"","url":"https://api.github.com/users/duboisph","html_url":"https://github.com/duboisph","followers_url":"https://api.github.com/users/duboisph/followers","following_url":"https://api.github.com/users/duboisph/following{/other_user}","gists_url":"https://api.github.com/users/duboisph/gists{/gist_id}","starred_url":"https://api.github.com/users/duboisph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duboisph/subscriptions","organizations_url":"https://api.github.com/users/duboisph/orgs","repos_url":"https://api.github.com/users/duboisph/repos","events_url":"https://api.github.com/users/duboisph/events{/privacy}","received_events_url":"https://api.github.com/users/duboisph/received_events","type":"User","site_admin":false},"body":"Remove the commented line :)","created_at":"2018-02-09T14:08:18Z","updated_at":"2018-02-09T14:09:06Z","html_url":"https://github.com/skyscrapers/terraform-logging/pull/2#discussion_r167235518","pull_request_url":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/2","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/comments/167235518"},"html":{"href":"https://github.com/skyscrapers/terraform-logging/pull/2#discussion_r167235518"},"pull_request":{"href":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/2","id":168238278,"html_url":"https://github.com/skyscrapers/terraform-logging/pull/2","diff_url":"https://github.com/skyscrapers/terraform-logging/pull/2.diff","patch_url":"https://github.com/skyscrapers/terraform-logging/pull/2.patch","issue_url":"https://api.github.com/repos/skyscrapers/terraform-logging/issues/2","number":2,"state":"open","locked":false,"title":"Add Cloudwatch logs to Elasticsearch module","user":{"login":"MattiasGees","id":2216724,"avatar_url":"https://avatars2.githubusercontent.com/u/2216724?v=4","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":"This adds a TF module to create the linking between an already existing Cloudwatch loggroup and AWS Elasticsearch. When this is setup properly, this will ship all the logs from Cloudwatch logs to Elasticsearch","created_at":"2018-02-09T13:22:27Z","updated_at":"2018-02-09T14:09:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c531aec4ccb2c20d8cd12b7019b131092dc7377","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/2/commits","review_comments_url":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/2/comments","review_comment_url":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/comments{/number}","comments_url":"https://api.github.com/repos/skyscrapers/terraform-logging/issues/2/comments","statuses_url":"https://api.github.com/repos/skyscrapers/terraform-logging/statuses/d6da9f1cdddd243bf34df5e46c70008b3fca4320","head":{"label":"skyscrapers:feature/cwlogs-to-s3","ref":"feature/cwlogs-to-s3","sha":"d6da9f1cdddd243bf34df5e46c70008b3fca4320","user":{"login":"skyscrapers","id":8297228,"avatar_url":"https://avatars2.githubusercontent.com/u/8297228?v=4","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":77231570,"name":"terraform-logging","full_name":"skyscrapers/terraform-logging","owner":{"login":"skyscrapers","id":8297228,"avatar_url":"https://avatars2.githubusercontent.com/u/8297228?v=4","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-logging","description":null,"fork":false,"url":"https://api.github.com/repos/skyscrapers/terraform-logging","forks_url":"https://api.github.com/repos/skyscrapers/terraform-logging/forks","keys_url":"https://api.github.com/repos/skyscrapers/terraform-logging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skyscrapers/terraform-logging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skyscrapers/terraform-logging/teams","hooks_url":"https://api.github.com/repos/skyscrapers/terraform-logging/hooks","issue_events_url":"https://api.github.com/repos/skyscrapers/terraform-logging/issues/events{/number}","events_url":"https://api.github.com/repos/skyscrapers/terraform-logging/events","assignees_url":"https://api.github.com/repos/skyscrapers/terraform-logging/assignees{/user}","branches_url":"https://api.github.com/repos/skyscrapers/terraform-logging/branches{/branch}","tags_url":"https://api.github.com/repos/skyscrapers/terraform-logging/tags","blobs_url":"https://api.github.com/repos/skyscrapers/terraform-logging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skyscrapers/terraform-logging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skyscrapers/terraform-logging/git/refs{/sha}","trees_url":"https://api.github.com/repos/skyscrapers/terraform-logging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skyscrapers/terraform-logging/statuses/{sha}","languages_url":"https://api.github.com/repos/skyscrapers/terraform-logging/languages","stargazers_url":"https://api.github.com/repos/skyscrapers/terraform-logging/stargazers","contributors_url":"https://api.github.com/repos/skyscrapers/terraform-logging/contributors","subscribers_url":"https://api.github.com/repos/skyscrapers/terraform-logging/subscribers","subscription_url":"https://api.github.com/repos/skyscrapers/terraform-logging/subscription","commits_url":"https://api.github.com/repos/skyscrapers/terraform-logging/commits{/sha}","git_commits_url":"https://api.github.com/repos/skyscrapers/terraform-logging/git/commits{/sha}","comments_url":"https://api.github.com/repos/skyscrapers/terraform-logging/comments{/number}","issue_comment_url":"https://api.github.com/repos/skyscrapers/terraform-logging/issues/comments{/number}","contents_url":"https://api.github.com/repos/skyscrapers/terraform-logging/contents/{+path}","compare_url":"https://api.github.com/repos/skyscrapers/terraform-logging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skyscrapers/terraform-logging/merges","archive_url":"https://api.github.com/repos/skyscrapers/terraform-logging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skyscrapers/terraform-logging/downloads","issues_url":"https://api.github.com/repos/skyscrapers/terraform-logging/issues{/number}","pulls_url":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls{/number}","milestones_url":"https://api.github.com/repos/skyscrapers/terraform-logging/milestones{/number}","notifications_url":"https://api.github.com/repos/skyscrapers/terraform-logging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skyscrapers/terraform-logging/labels{/name}","releases_url":"https://api.github.com/repos/skyscrapers/terraform-logging/releases{/id}","deployments_url":"https://api.github.com/repos/skyscrapers/terraform-logging/deployments","created_at":"2016-12-23T14:48:17Z","updated_at":"2018-01-21T21:24:50Z","pushed_at":"2018-02-09T13:22:28Z","git_url":"git://github.com/skyscrapers/terraform-logging.git","ssh_url":"git@github.com:skyscrapers/terraform-logging.git","clone_url":"https://github.com/skyscrapers/terraform-logging.git","svn_url":"https://github.com/skyscrapers/terraform-logging","homepage":null,"size":3,"stargazers_count":1,"watchers_count":1,"language":"HCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"skyscrapers:master","ref":"master","sha":"05314aa23e748ccf06b5e6cc0c13ff0c70d8cd34","user":{"login":"skyscrapers","id":8297228,"avatar_url":"https://avatars2.githubusercontent.com/u/8297228?v=4","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":77231570,"name":"terraform-logging","full_name":"skyscrapers/terraform-logging","owner":{"login":"skyscrapers","id":8297228,"avatar_url":"https://avatars2.githubusercontent.com/u/8297228?v=4","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-logging","description":null,"fork":false,"url":"https://api.github.com/repos/skyscrapers/terraform-logging","forks_url":"https://api.github.com/repos/skyscrapers/terraform-logging/forks","keys_url":"https://api.github.com/repos/skyscrapers/terraform-logging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skyscrapers/terraform-logging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skyscrapers/terraform-logging/teams","hooks_url":"https://api.github.com/repos/skyscrapers/terraform-logging/hooks","issue_events_url":"https://api.github.com/repos/skyscrapers/terraform-logging/issues/events{/number}","events_url":"https://api.github.com/repos/skyscrapers/terraform-logging/events","assignees_url":"https://api.github.com/repos/skyscrapers/terraform-logging/assignees{/user}","branches_url":"https://api.github.com/repos/skyscrapers/terraform-logging/branches{/branch}","tags_url":"https://api.github.com/repos/skyscrapers/terraform-logging/tags","blobs_url":"https://api.github.com/repos/skyscrapers/terraform-logging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skyscrapers/terraform-logging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skyscrapers/terraform-logging/git/refs{/sha}","trees_url":"https://api.github.com/repos/skyscrapers/terraform-logging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skyscrapers/terraform-logging/statuses/{sha}","languages_url":"https://api.github.com/repos/skyscrapers/terraform-logging/languages","stargazers_url":"https://api.github.com/repos/skyscrapers/terraform-logging/stargazers","contributors_url":"https://api.github.com/repos/skyscrapers/terraform-logging/contributors","subscribers_url":"https://api.github.com/repos/skyscrapers/terraform-logging/subscribers","subscription_url":"https://api.github.com/repos/skyscrapers/terraform-logging/subscription","commits_url":"https://api.github.com/repos/skyscrapers/terraform-logging/commits{/sha}","git_commits_url":"https://api.github.com/repos/skyscrapers/terraform-logging/git/commits{/sha}","comments_url":"https://api.github.com/repos/skyscrapers/terraform-logging/comments{/number}","issue_comment_url":"https://api.github.com/repos/skyscrapers/terraform-logging/issues/comments{/number}","contents_url":"https://api.github.com/repos/skyscrapers/terraform-logging/contents/{+path}","compare_url":"https://api.github.com/repos/skyscrapers/terraform-logging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skyscrapers/terraform-logging/merges","archive_url":"https://api.github.com/repos/skyscrapers/terraform-logging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skyscrapers/terraform-logging/downloads","issues_url":"https://api.github.com/repos/skyscrapers/terraform-logging/issues{/number}","pulls_url":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls{/number}","milestones_url":"https://api.github.com/repos/skyscrapers/terraform-logging/milestones{/number}","notifications_url":"https://api.github.com/repos/skyscrapers/terraform-logging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skyscrapers/terraform-logging/labels{/name}","releases_url":"https://api.github.com/repos/skyscrapers/terraform-logging/releases{/id}","deployments_url":"https://api.github.com/repos/skyscrapers/terraform-logging/deployments","created_at":"2016-12-23T14:48:17Z","updated_at":"2018-01-21T21:24:50Z","pushed_at":"2018-02-09T13:22:28Z","git_url":"git://github.com/skyscrapers/terraform-logging.git","ssh_url":"git@github.com:skyscrapers/terraform-logging.git","clone_url":"https://github.com/skyscrapers/terraform-logging.git","svn_url":"https://github.com/skyscrapers/terraform-logging","homepage":null,"size":3,"stargazers_count":1,"watchers_count":1,"language":"HCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/2"},"html":{"href":"https://github.com/skyscrapers/terraform-logging/pull/2"},"issue":{"href":"https://api.github.com/repos/skyscrapers/terraform-logging/issues/2"},"comments":{"href":"https://api.github.com/repos/skyscrapers/terraform-logging/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/skyscrapers/terraform-logging/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/skyscrapers/terraform-logging/statuses/d6da9f1cdddd243bf34df5e46c70008b3fca4320"}},"author_association":"OWNER"}}
{"actor":{"display_login":"duboisph"}}