{"action":"created","comment":{"url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/comments/223513294","pull_request_review_id":162658399,"id":223513294,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzUxMzI5NA==","diff_hunk":"@@ -137,11 +143,30 @@ function generate_vault_config {\n   local readonly enable_s3_backend=\"$8\"\n   local readonly s3_bucket=\"$9\"\n   local readonly s3_bucket_region=\"${10}\"\n+  local readonly enable_auto_unseal=\"${11}\"\n+  local readonly auto_unseal_kms_key=\"${12}\"\n+  local readonly auto_unseal_kms_key_region=\"${13}\"\n   local readonly config_path=\"$config_dir/$VAULT_CONFIG_FILE\"\n \n   local instance_ip_address\n   instance_ip_address=$(get_instance_ip_address)\n \n+  local auto_unseal_config=\"\"\n+  if [[ \"$enable_auto_unseal\" == \"true\" ]]; then\n+    auto_unseal_config=$(cat <<EOF\n+seal \"awskms\" {\n+  kms_key_id = \"$auto_unseal_kms_key\"\n+  region = \"$auto_unseal_kms_key_region\"\n+}\\n\n+EOF\n+)\n+  fi\n+\n+  # kms_key_id = \"d7c1ffd9-8cce-45e7-be4a-bb38dd205966\"\n+  # region      = \"$auto_unseal_region\"\n+  # access_key = \"AKIAIOSFODNN7EXAMPLE\"\n+  # secret_key = \"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\"","path":"modules/run-vault/run-vault","position":39,"original_position":39,"commit_id":"bb45a68673022239c2ebc071cc8e2805487010e5","original_commit_id":"bb45a68673022239c2ebc071cc8e2805487010e5","user":{"login":"brikis98","id":711908,"node_id":"MDQ6VXNlcjcxMTkwOA==","avatar_url":"https://avatars1.githubusercontent.com/u/711908?v=4","gravatar_id":"","url":"https://api.github.com/users/brikis98","html_url":"https://github.com/brikis98","followers_url":"https://api.github.com/users/brikis98/followers","following_url":"https://api.github.com/users/brikis98/following{/other_user}","gists_url":"https://api.github.com/users/brikis98/gists{/gist_id}","starred_url":"https://api.github.com/users/brikis98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brikis98/subscriptions","organizations_url":"https://api.github.com/users/brikis98/orgs","repos_url":"https://api.github.com/users/brikis98/repos","events_url":"https://api.github.com/users/brikis98/events{/privacy}","received_events_url":"https://api.github.com/users/brikis98/received_events","type":"User","site_admin":false},"body":"Please remove this comment and if these are real keys, revoke them 😄 ","created_at":"2018-10-08T22:22:35Z","updated_at":"2018-10-08T22:23:17Z","html_url":"https://github.com/hashicorp/terraform-aws-vault/pull/98#discussion_r223513294","pull_request_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/98","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/comments/223513294"},"html":{"href":"https://github.com/hashicorp/terraform-aws-vault/pull/98#discussion_r223513294"},"pull_request":{"href":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/98"}}},"pull_request":{"url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/98","id":221240614,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMjQwNjE0","html_url":"https://github.com/hashicorp/terraform-aws-vault/pull/98","diff_url":"https://github.com/hashicorp/terraform-aws-vault/pull/98.diff","patch_url":"https://github.com/hashicorp/terraform-aws-vault/pull/98.patch","issue_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/issues/98","number":98,"state":"open","locked":false,"title":"Example/auto unseal","user":{"login":"Etiene","id":1516418,"node_id":"MDQ6VXNlcjE1MTY0MTg=","avatar_url":"https://avatars0.githubusercontent.com/u/1516418?v=4","gravatar_id":"","url":"https://api.github.com/users/Etiene","html_url":"https://github.com/Etiene","followers_url":"https://api.github.com/users/Etiene/followers","following_url":"https://api.github.com/users/Etiene/following{/other_user}","gists_url":"https://api.github.com/users/Etiene/gists{/gist_id}","starred_url":"https://api.github.com/users/Etiene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Etiene/subscriptions","organizations_url":"https://api.github.com/users/Etiene/orgs","repos_url":"https://api.github.com/users/Etiene/repos","events_url":"https://api.github.com/users/Etiene/events{/privacy}","received_events_url":"https://api.github.com/users/Etiene/received_events","type":"User","site_admin":false},"body":"Basic example of vault auto unseal\r\n\r\n- [x] run-vault update\r\n- [x] vault-cluster update\r\n- [x] example\r\n\r\n* Docs and tests to come at follow up PR\r\n* Enterprise license provisioning to come at follow up PR","created_at":"2018-10-08T20:55:39Z","updated_at":"2018-10-08T22:23:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f7a1ffc16bdef770648623147507c56c9174f26","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/98/commits","review_comments_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/98/comments","review_comment_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/issues/98/comments","statuses_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/statuses/bb45a68673022239c2ebc071cc8e2805487010e5","head":{"label":"hashicorp:example/auto-unseal","ref":"example/auto-unseal","sha":"bb45a68673022239c2ebc071cc8e2805487010e5","user":{"login":"hashicorp","id":761456,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MTQ1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":103201301,"node_id":"MDEwOlJlcG9zaXRvcnkxMDMyMDEzMDE=","name":"terraform-aws-vault","full_name":"hashicorp/terraform-aws-vault","private":false,"owner":{"login":"hashicorp","id":761456,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MTQ1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/hashicorp/terraform-aws-vault","description":"A Terraform Module for how to run Vault on AWS using Terraform and Packer","fork":false,"url":"https://api.github.com/repos/hashicorp/terraform-aws-vault","forks_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/forks","keys_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/teams","hooks_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/events","assignees_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/tags","blobs_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/languages","stargazers_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/subscription","commits_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/merges","archive_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/downloads","issues_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/releases{/id}","deployments_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/deployments","created_at":"2017-09-12T00:17:34Z","updated_at":"2018-10-04T09:18:18Z","pushed_at":"2018-10-08T20:55:39Z","git_url":"git://github.com/hashicorp/terraform-aws-vault.git","ssh_url":"git@github.com:hashicorp/terraform-aws-vault.git","clone_url":"https://github.com/hashicorp/terraform-aws-vault.git","svn_url":"https://github.com/hashicorp/terraform-aws-vault","homepage":null,"size":2754,"stargazers_count":195,"watchers_count":195,"language":"HCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":108,"open_issues":27,"watchers":195,"default_branch":"master"}},"base":{"label":"hashicorp:master","ref":"master","sha":"c4f194aa7290d89342b621bb344ee2a73c800159","user":{"login":"hashicorp","id":761456,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MTQ1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":103201301,"node_id":"MDEwOlJlcG9zaXRvcnkxMDMyMDEzMDE=","name":"terraform-aws-vault","full_name":"hashicorp/terraform-aws-vault","private":false,"owner":{"login":"hashicorp","id":761456,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MTQ1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/hashicorp/terraform-aws-vault","description":"A Terraform Module for how to run Vault on AWS using Terraform and Packer","fork":false,"url":"https://api.github.com/repos/hashicorp/terraform-aws-vault","forks_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/forks","keys_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/teams","hooks_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/events","assignees_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/tags","blobs_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/languages","stargazers_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/subscription","commits_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/merges","archive_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/downloads","issues_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/releases{/id}","deployments_url":"https://api.github.com/repos/hashicorp/terraform-aws-vault/deployments","created_at":"2017-09-12T00:17:34Z","updated_at":"2018-10-04T09:18:18Z","pushed_at":"2018-10-08T20:55:39Z","git_url":"git://github.com/hashicorp/terraform-aws-vault.git","ssh_url":"git@github.com:hashicorp/terraform-aws-vault.git","clone_url":"https://github.com/hashicorp/terraform-aws-vault.git","svn_url":"https://github.com/hashicorp/terraform-aws-vault","homepage":null,"size":2754,"stargazers_count":195,"watchers_count":195,"language":"HCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":108,"open_issues":27,"watchers":195,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/98"},"html":{"href":"https://github.com/hashicorp/terraform-aws-vault/pull/98"},"issue":{"href":"https://api.github.com/repos/hashicorp/terraform-aws-vault/issues/98"},"comments":{"href":"https://api.github.com/repos/hashicorp/terraform-aws-vault/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hashicorp/terraform-aws-vault/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/hashicorp/terraform-aws-vault/statuses/bb45a68673022239c2ebc071cc8e2805487010e5"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"brikis98"}}