Principal * gets rejected by AWS, use cloudtrail.amazonaws.com instead.

This commit is contained in:
Lee Provoost 2016-01-19 08:54:42 +00:00
parent 36997b2e70
commit 96f3f76118
1 changed files with 6 additions and 2 deletions

View File

@ -29,14 +29,18 @@ resource "aws_s3_bucket" "foo" {
{
"Sid": "AWSCloudTrailAclCheck",
"Effect": "Allow",
"Principal": "*",
"Principal": {
"Service": "cloudtrail.amazonaws.com"
},
"Action": "s3:GetBucketAcl",
"Resource": "arn:aws:s3:::tf-test-trail"
},
{
"Sid": "AWSCloudTrailWrite",
"Effect": "Allow",
"Principal": "*",
"Principal": {
"Service": "cloudtrail.amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::tf-test-trail/*",
"Condition": {