Skip to content

Commit

Permalink
Use splat+join pattern to avoid erroneous recreates of the policy (#29)
Browse files Browse the repository at this point in the history
Co-authored-by: Erik Osterman <[email protected]>
  • Loading branch information
adamcrews and osterman authored Jun 7, 2020
1 parent dcdcca3 commit 1cdecec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ data "aws_iam_policy_document" "bucket_policy" {
sid = "DenyUnEncryptedObjectUploads"
effect = "Deny"
actions = ["s3:PutObject"]
resources = ["arn:aws:s3:::${aws_s3_bucket.default[0].id}/*"]
resources = ["arn:aws:s3:::${join("", aws_s3_bucket.default.*.id)}/*"]

principals {
identifiers = ["*"]
Expand Down

0 comments on commit 1cdecec

Please sign in to comment.