Skip to content

Commit

Permalink
fix: writers for bucket is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
swiknaba committed Jul 4, 2024
1 parent eaf1bb9 commit 49a6465
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aws/s3/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ locals {
}

resource "aws_s3_bucket_policy" "writers" {
count = length(var.writers) > 0 ? 1 : 0

bucket = aws_s3_bucket.main.id
policy = local.writers_policy_json
}

0 comments on commit 49a6465

Please sign in to comment.