Skip to content

Commit

Permalink
Add a condition to create bucket policy (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
franklinpashok authored Jan 16, 2024
1 parent 1f24d0e commit 55288a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ module "s3" {


resource "aws_s3_bucket_policy" "docs" {

count = var.create_bucket ? 1 : 0
bucket = module.s3.s3_bucket_id
policy = data.aws_iam_policy_document.s3_policy_merge.json

Expand Down

0 comments on commit 55288a4

Please sign in to comment.