Skip to content

Commit

Permalink
Use string instead of array for S3 policy’s Action
Browse files Browse the repository at this point in the history
Due to a Terraform bug (hashicorp/terraform#4948), if Action is set to a single-element array, the S3 policy always reports that it needs to be modified in place. The workaround is to use a string.
  • Loading branch information
vandrijevik committed May 16, 2018
1 parent 2afc8de commit ae243fb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions aws/application_load_balancer/load_balancer/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ resource "aws_s3_bucket_policy" "load_balancer_access_logs" {
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:PutObject"
],
"Action": "s3:PutObject",
"Effect": "Allow",
"Resource": "${aws_s3_bucket.load_balancer_access_logs.arn}/AWSLogs/${data.aws_caller_identity.aws_account.account_id}/*",
"Principal": {
Expand Down

0 comments on commit ae243fb

Please sign in to comment.