{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/5473","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/5473/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/5473/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/5473/events","html_url":"https://github.com/hashicorp/terraform/pull/5473","id":138793091,"number":5473,"title":"provider/aws: Support S3 bucket notification","user":{"login":"kjmkznr","id":85144,"avatar_url":"https://avatars.githubusercontent.com/u/85144?v=3","gravatar_id":"","url":"https://api.github.com/users/kjmkznr","html_url":"https://github.com/kjmkznr","followers_url":"https://api.github.com/users/kjmkznr/followers","following_url":"https://api.github.com/users/kjmkznr/following{/other_user}","gists_url":"https://api.github.com/users/kjmkznr/gists{/gist_id}","starred_url":"https://api.github.com/users/kjmkznr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjmkznr/subscriptions","organizations_url":"https://api.github.com/users/kjmkznr/orgs","repos_url":"https://api.github.com/users/kjmkznr/repos","events_url":"https://api.github.com/users/kjmkznr/events{/privacy}","received_events_url":"https://api.github.com/users/kjmkznr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/enhancement","name":"enhancement","color":"d4c5f9"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/new-resource","name":"new-resource","color":"d4c5f9"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/aws","name":"provider/aws","color":"bfdadc"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/waiting-response","name":"waiting-response","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-06T14:02:58Z","updated_at":"2016-03-12T17:26:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/5473","html_url":"https://github.com/hashicorp/terraform/pull/5473","diff_url":"https://github.com/hashicorp/terraform/pull/5473.diff","patch_url":"https://github.com/hashicorp/terraform/pull/5473.patch"},"body":"Add [S3 bucket notification](http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTnotification.html) resource.\r\n\r\nThe reason for creating a new resource is to avoid the circular reference.\r\n\r\n```\r\nresource \"aws_sns_topic\" \"topic\" {\r\n    name = \"terraform-test-topic\"\r\n        policy = <<POLICY\r\n{\r\n        \"Version\":\"2012-10-17\",\r\n        \"Statement\":[{\r\n                \"Effect\": \"Allow\",\r\n                \"Principal\": {\"AWS\":\"*\"},\r\n                \"Action\": \"SNS:Publish\",\r\n                \"Resource\": \"arn:aws:sns:*:*:terraform-test-topic\",\r\n                \"Condition\":{\r\n                        \"ArnLike\":{\"aws:SourceArn\":\"${aws_s3_bucket.bucket.arn}\"}\r\n                }\r\n        }]\r\n}\r\nPOLICY\r\n}\r\n\r\nresource \"aws_s3_bucket\" \"bucket\" {\r\n        bucket = \"tf-test-bucket-1928392189481395839258\"\r\n}\r\n\r\nresource \"aws_s3_bucket_notification\" \"bucket_notification\" {\r\n\tbucket = \"${aws_s3_bucket.bucket.id}\"\r\n\ttopic {\r\n\t\ttopic = \"${aws_sns_topic.topic.arn}\"\r\n\t\tevents = [\"s3:ObjectCreated:*\"]\r\n\t\tfilter_suffix = \".log\"\r\n\t}\r\n\tqueue {\r\n\t\t...\r\n\t}\r\n\tlambda_function {\r\n\t\t...\r\n\t}\r\n}\r\n```\r\n\r\n### Acceptance test\r\n\r\n```\r\n$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSS3Bucket_Notification'                                                         \r\n==> Checking that code complies with gofmt requirements...\r\n/home/kjmkznr/go/bin/stringer\r\ngo generate $(go list ./... | grep -v /vendor/)\r\nTF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSS3Bucket_Notification -timeout 120m\r\n=== RUN   TestAccAWSS3Bucket_Notification\r\n--- PASS: TestAccAWSS3Bucket_Notification (66.94s)\r\nPASS\r\nok      github.com/hashicorp/terraform/builtin/providers/aws    66.945s\r\n```"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/195777482","html_url":"https://github.com/hashicorp/terraform/pull/5473#issuecomment-195777482","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/5473","id":195777482,"user":{"login":"kjmkznr","id":85144,"avatar_url":"https://avatars.githubusercontent.com/u/85144?v=3","gravatar_id":"","url":"https://api.github.com/users/kjmkznr","html_url":"https://github.com/kjmkznr","followers_url":"https://api.github.com/users/kjmkznr/followers","following_url":"https://api.github.com/users/kjmkznr/following{/other_user}","gists_url":"https://api.github.com/users/kjmkznr/gists{/gist_id}","starred_url":"https://api.github.com/users/kjmkznr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjmkznr/subscriptions","organizations_url":"https://api.github.com/users/kjmkznr/orgs","repos_url":"https://api.github.com/users/kjmkznr/repos","events_url":"https://api.github.com/users/kjmkznr/events{/privacy}","received_events_url":"https://api.github.com/users/kjmkznr/received_events","type":"User","site_admin":false},"created_at":"2016-03-12T17:26:26Z","updated_at":"2016-03-12T17:26:26Z","body":"@akerl Thanks find bug.\r\nFixed failed when not specific both `filter_prefix` and `filter_suffix` parameters.\r\nPlease try again."}}