{"action":"created","comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/comments/225232611","pull_request_review_id":164789493,"id":225232611,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTIzMjYxMQ==","diff_hunk":"@@ -38,18 +38,73 @@ func resourceAwsAthenaDatabase() *schema.Resource {\n \t\t\t\tOptional: true,\n \t\t\t\tDefault:  false,\n \t\t\t},\n+\t\t\t\"encryption_key\": {","path":"aws/resource_aws_athena_database.go","position":4,"original_position":4,"commit_id":"d3899335922e94d5e8cadade5db1f1dcd349f8bc","original_commit_id":"acd62c2af1096f501a64c297897ef25c8b4ff504","user":{"login":"bflad","id":189114,"node_id":"MDQ6VXNlcjE4OTExNA==","avatar_url":"https://avatars3.githubusercontent.com/u/189114?v=4","gravatar_id":"","url":"https://api.github.com/users/bflad","html_url":"https://github.com/bflad","followers_url":"https://api.github.com/users/bflad/followers","following_url":"https://api.github.com/users/bflad/following{/other_user}","gists_url":"https://api.github.com/users/bflad/gists{/gist_id}","starred_url":"https://api.github.com/users/bflad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bflad/subscriptions","organizations_url":"https://api.github.com/users/bflad/orgs","repos_url":"https://api.github.com/users/bflad/repos","events_url":"https://api.github.com/users/bflad/events{/privacy}","received_events_url":"https://api.github.com/users/bflad/received_events","type":"User","site_admin":false},"body":"It might make a bit more sense today, but not necessarily in the future should the API change.  Here are a few reasons we prefer to stick with the API:\r\n* We have gotten bitten in the past by trying to create abstractions and the API changes in a way that doesn't match those abstractions.\r\n* Less of a maintenance burden to mentally work with the codebase if there are no abstractions/conversions.\r\n* It keeps Terraform in line with the AWS API documentation, SDKs, and CloudFormation so operators coming from other documentation or systems can easily reference or convert between them.\r\n* Different AWS services don't always line up with each other in terms of implementations. While this may look similar to CodePipeline today, Athena or CodePipeline may change tomorrow.\r\n\r\nHope this helps!","created_at":"2018-10-15T16:27:59Z","updated_at":"2018-10-15T16:28:00Z","html_url":"https://github.com/terraform-providers/terraform-provider-aws/pull/6117#discussion_r225232611","pull_request_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/6117","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/comments/225232611"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-aws/pull/6117#discussion_r225232611"},"pull_request":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/6117"}},"in_reply_to_id":225012416},"pull_request":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/6117","id":221956448,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxOTU2NDQ4","html_url":"https://github.com/terraform-providers/terraform-provider-aws/pull/6117","diff_url":"https://github.com/terraform-providers/terraform-provider-aws/pull/6117.diff","patch_url":"https://github.com/terraform-providers/terraform-provider-aws/pull/6117.patch","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/6117","number":6117,"state":"open","locked":false,"title":"Add KMS encryption support to the aws_athena_database resource.","user":{"login":"joestump","id":37667,"node_id":"MDQ6VXNlcjM3NjY3","avatar_url":"https://avatars1.githubusercontent.com/u/37667?v=4","gravatar_id":"","url":"https://api.github.com/users/joestump","html_url":"https://github.com/joestump","followers_url":"https://api.github.com/users/joestump/followers","following_url":"https://api.github.com/users/joestump/following{/other_user}","gists_url":"https://api.github.com/users/joestump/gists{/gist_id}","starred_url":"https://api.github.com/users/joestump/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joestump/subscriptions","organizations_url":"https://api.github.com/users/joestump/orgs","repos_url":"https://api.github.com/users/joestump/repos","events_url":"https://api.github.com/users/joestump/events{/privacy}","received_events_url":"https://api.github.com/users/joestump/received_events","type":"User","site_admin":false},"body":"## What does this add?\r\n\r\nAdds an `encryption_key` attribute to the `aws_athena_database` resource. This allows TF to create databases that read from encrypted S3 buckets.\r\n\r\n## Example HCL\r\n\r\n```hcl\r\nresource \"aws_kms_key\" \"test\" {\r\n  name = \"athenta-test\"\r\n}\r\n\r\nresource \"aws_athena_database\" \"test\" {\r\n  name          = \"athena-test\"\r\n  bucket        = \"${aws_s3_bucket.test.bucket}\"\r\n  force_destroy = true\r\n\r\n  encryption_key {\r\n    type = \"SSE_KMS\"\r\n    id   = \"${aws_kms_key.test.arn}\" \r\n  }\r\n}\r\n```\r\n\r\n## Test output\r\n\r\n```\r\nmake testacc TESTARGS='-run=TestAccAWSAthenaDatabase'\r\nTF_ACC=1 go test ./... -v -run=TestAccAWSAthenaDatabase -timeout 120m\r\n?   \tgithub.com/terraform-providers/terraform-provider-aws\t[no test files]\r\n=== RUN   TestAccAWSAthenaDatabase_basic\r\n--- PASS: TestAccAWSAthenaDatabase_basic (49.53s)\r\n=== RUN   TestAccAWSAthenaDatabase_encryption\r\n--- PASS: TestAccAWSAthenaDatabase_encryption (79.31s)\r\n=== RUN   TestAccAWSAthenaDatabase_nameStartsWithUnderscore\r\n--- PASS: TestAccAWSAthenaDatabase_nameStartsWithUnderscore (49.75s)\r\n=== RUN   TestAccAWSAthenaDatabase_nameCantHaveUppercase\r\n--- PASS: TestAccAWSAthenaDatabase_nameCantHaveUppercase (0.92s)\r\n=== RUN   TestAccAWSAthenaDatabase_destroyFailsIfTablesExist\r\n--- PASS: TestAccAWSAthenaDatabase_destroyFailsIfTablesExist (61.16s)\r\n=== RUN   TestAccAWSAthenaDatabase_forceDestroyAlwaysSucceeds\r\n--- PASS: TestAccAWSAthenaDatabase_forceDestroyAlwaysSucceeds (72.15s)\r\nPASS\r\nok  \tgithub.com/terraform-providers/terraform-provider-aws/aws\t314.027s\r\n```","created_at":"2018-10-10T22:46:34Z","updated_at":"2018-10-15T16:28:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f338fc29c981a2bd7836b4f379d6800d2d0ee3a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":620316276,"node_id":"MDU6TGFiZWw2MjAzMTYyNzY=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/documentation","name":"documentation","color":"fef2c0","default":false},{"id":801971575,"node_id":"MDU6TGFiZWw4MDE5NzE1NzU=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/service/athena","name":"service/athena","color":"bfd4f2","default":false},{"id":737832193,"node_id":"MDU6TGFiZWw3Mzc4MzIxOTM=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/size/M","name":"size/M","color":"ffffff","default":false},{"id":784095310,"node_id":"MDU6TGFiZWw3ODQwOTUzMTA=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/tests","name":"tests","color":"DDDDDD","default":false},{"id":623647943,"node_id":"MDU6TGFiZWw2MjM2NDc5NDM=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/waiting-response","name":"waiting-response","color":"5319e7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/6117/commits","review_comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/6117/comments","review_comment_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/comments{/number}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/6117/comments","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/statuses/d3899335922e94d5e8cadade5db1f1dcd349f8bc","head":{"label":"joestump:jstump-kms-athena","ref":"jstump-kms-athena","sha":"d3899335922e94d5e8cadade5db1f1dcd349f8bc","user":{"login":"joestump","id":37667,"node_id":"MDQ6VXNlcjM3NjY3","avatar_url":"https://avatars1.githubusercontent.com/u/37667?v=4","gravatar_id":"","url":"https://api.github.com/users/joestump","html_url":"https://github.com/joestump","followers_url":"https://api.github.com/users/joestump/followers","following_url":"https://api.github.com/users/joestump/following{/other_user}","gists_url":"https://api.github.com/users/joestump/gists{/gist_id}","starred_url":"https://api.github.com/users/joestump/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joestump/subscriptions","organizations_url":"https://api.github.com/users/joestump/orgs","repos_url":"https://api.github.com/users/joestump/repos","events_url":"https://api.github.com/users/joestump/events{/privacy}","received_events_url":"https://api.github.com/users/joestump/received_events","type":"User","site_admin":false},"repo":{"id":124571041,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQ1NzEwNDE=","name":"terraform-provider-aws","full_name":"joestump/terraform-provider-aws","private":false,"owner":{"login":"joestump","id":37667,"node_id":"MDQ6VXNlcjM3NjY3","avatar_url":"https://avatars1.githubusercontent.com/u/37667?v=4","gravatar_id":"","url":"https://api.github.com/users/joestump","html_url":"https://github.com/joestump","followers_url":"https://api.github.com/users/joestump/followers","following_url":"https://api.github.com/users/joestump/following{/other_user}","gists_url":"https://api.github.com/users/joestump/gists{/gist_id}","starred_url":"https://api.github.com/users/joestump/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joestump/subscriptions","organizations_url":"https://api.github.com/users/joestump/orgs","repos_url":"https://api.github.com/users/joestump/repos","events_url":"https://api.github.com/users/joestump/events{/privacy}","received_events_url":"https://api.github.com/users/joestump/received_events","type":"User","site_admin":false},"html_url":"https://github.com/joestump/terraform-provider-aws","description":"Terraform AWS provider","fork":true,"url":"https://api.github.com/repos/joestump/terraform-provider-aws","forks_url":"https://api.github.com/repos/joestump/terraform-provider-aws/forks","keys_url":"https://api.github.com/repos/joestump/terraform-provider-aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joestump/terraform-provider-aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joestump/terraform-provider-aws/teams","hooks_url":"https://api.github.com/repos/joestump/terraform-provider-aws/hooks","issue_events_url":"https://api.github.com/repos/joestump/terraform-provider-aws/issues/events{/number}","events_url":"https://api.github.com/repos/joestump/terraform-provider-aws/events","assignees_url":"https://api.github.com/repos/joestump/terraform-provider-aws/assignees{/user}","branches_url":"https://api.github.com/repos/joestump/terraform-provider-aws/branches{/branch}","tags_url":"https://api.github.com/repos/joestump/terraform-provider-aws/tags","blobs_url":"https://api.github.com/repos/joestump/terraform-provider-aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joestump/terraform-provider-aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joestump/terraform-provider-aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/joestump/terraform-provider-aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joestump/terraform-provider-aws/statuses/{sha}","languages_url":"https://api.github.com/repos/joestump/terraform-provider-aws/languages","stargazers_url":"https://api.github.com/repos/joestump/terraform-provider-aws/stargazers","contributors_url":"https://api.github.com/repos/joestump/terraform-provider-aws/contributors","subscribers_url":"https://api.github.com/repos/joestump/terraform-provider-aws/subscribers","subscription_url":"https://api.github.com/repos/joestump/terraform-provider-aws/subscription","commits_url":"https://api.github.com/repos/joestump/terraform-provider-aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/joestump/terraform-provider-aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/joestump/terraform-provider-aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/joestump/terraform-provider-aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/joestump/terraform-provider-aws/contents/{+path}","compare_url":"https://api.github.com/repos/joestump/terraform-provider-aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joestump/terraform-provider-aws/merges","archive_url":"https://api.github.com/repos/joestump/terraform-provider-aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joestump/terraform-provider-aws/downloads","issues_url":"https://api.github.com/repos/joestump/terraform-provider-aws/issues{/number}","pulls_url":"https://api.github.com/repos/joestump/terraform-provider-aws/pulls{/number}","milestones_url":"https://api.github.com/repos/joestump/terraform-provider-aws/milestones{/number}","notifications_url":"https://api.github.com/repos/joestump/terraform-provider-aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joestump/terraform-provider-aws/labels{/name}","releases_url":"https://api.github.com/repos/joestump/terraform-provider-aws/releases{/id}","deployments_url":"https://api.github.com/repos/joestump/terraform-provider-aws/deployments","created_at":"2018-03-09T17:17:26Z","updated_at":"2018-03-09T17:17:32Z","pushed_at":"2018-10-15T16:26:50Z","git_url":"git://github.com/joestump/terraform-provider-aws.git","ssh_url":"git@github.com:joestump/terraform-provider-aws.git","clone_url":"https://github.com/joestump/terraform-provider-aws.git","svn_url":"https://github.com/joestump/terraform-provider-aws","homepage":"https://www.terraform.io/docs/providers/aws/","size":54911,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"terraform-providers:master","ref":"master","sha":"9f42a5a79ab7d3010615cee778ca204b5f86dafe","user":{"login":"terraform-providers","id":29154831,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTU0ODMx","avatar_url":"https://avatars0.githubusercontent.com/u/29154831?v=4","gravatar_id":"","url":"https://api.github.com/users/terraform-providers","html_url":"https://github.com/terraform-providers","followers_url":"https://api.github.com/users/terraform-providers/followers","following_url":"https://api.github.com/users/terraform-providers/following{/other_user}","gists_url":"https://api.github.com/users/terraform-providers/gists{/gist_id}","starred_url":"https://api.github.com/users/terraform-providers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terraform-providers/subscriptions","organizations_url":"https://api.github.com/users/terraform-providers/orgs","repos_url":"https://api.github.com/users/terraform-providers/repos","events_url":"https://api.github.com/users/terraform-providers/events{/privacy}","received_events_url":"https://api.github.com/users/terraform-providers/received_events","type":"Organization","site_admin":false},"repo":{"id":93444615,"node_id":"MDEwOlJlcG9zaXRvcnk5MzQ0NDYxNQ==","name":"terraform-provider-aws","full_name":"terraform-providers/terraform-provider-aws","private":false,"owner":{"login":"terraform-providers","id":29154831,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTU0ODMx","avatar_url":"https://avatars0.githubusercontent.com/u/29154831?v=4","gravatar_id":"","url":"https://api.github.com/users/terraform-providers","html_url":"https://github.com/terraform-providers","followers_url":"https://api.github.com/users/terraform-providers/followers","following_url":"https://api.github.com/users/terraform-providers/following{/other_user}","gists_url":"https://api.github.com/users/terraform-providers/gists{/gist_id}","starred_url":"https://api.github.com/users/terraform-providers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terraform-providers/subscriptions","organizations_url":"https://api.github.com/users/terraform-providers/orgs","repos_url":"https://api.github.com/users/terraform-providers/repos","events_url":"https://api.github.com/users/terraform-providers/events{/privacy}","received_events_url":"https://api.github.com/users/terraform-providers/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/terraform-providers/terraform-provider-aws","description":"Terraform AWS provider","fork":false,"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws","forks_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/forks","keys_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/teams","hooks_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/hooks","issue_events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/events{/number}","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/events","assignees_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/assignees{/user}","branches_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/branches{/branch}","tags_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/tags","blobs_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/statuses/{sha}","languages_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/languages","stargazers_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/stargazers","contributors_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/contributors","subscribers_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/subscribers","subscription_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/subscription","commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/contents/{+path}","compare_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/merges","archive_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/downloads","issues_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues{/number}","pulls_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls{/number}","milestones_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/milestones{/number}","notifications_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels{/name}","releases_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/releases{/id}","deployments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/deployments","created_at":"2017-06-05T20:37:52Z","updated_at":"2018-10-15T16:09:56Z","pushed_at":"2018-10-15T16:26:52Z","git_url":"git://github.com/terraform-providers/terraform-provider-aws.git","ssh_url":"git@github.com:terraform-providers/terraform-provider-aws.git","clone_url":"https://github.com/terraform-providers/terraform-provider-aws.git","svn_url":"https://github.com/terraform-providers/terraform-provider-aws","homepage":"https://www.terraform.io/docs/providers/aws/","size":54643,"stargazers_count":1683,"watchers_count":1683,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1479,"mirror_url":null,"archived":false,"open_issues_count":1872,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":1479,"open_issues":1872,"watchers":1683,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/6117"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-aws/pull/6117"},"issue":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/6117"},"comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/6117/comments"},"review_comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/6117/comments"},"review_comment":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/pulls/6117/commits"},"statuses":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/statuses/d3899335922e94d5e8cadade5db1f1dcd349f8bc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bflad"}}