Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
max-lobur committed Nov 11, 2023
1 parent 53a29c0 commit a1a5ce6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,19 @@ module "codepipeline_label" {
context = module.this.context
}

resource "aws_s3_bucket_ownership_controls" "default" {
count = module.this.enabled ? 1 : 0
bucket = join("", resource.aws_s3_bucket.default[*].id)
rule {
object_ownership = "BucketOwnerPreferred"
}
}

resource "aws_s3_bucket_acl" "default" {
bucket = resource.aws_s3_bucket.id
count = module.this.enabled ? 1 : 0
bucket = join("", resource.aws_s3_bucket.default[*].id)
acl = "private"
depends_on = [aws_s3_bucket_ownership_controls.default]
}

resource "aws_s3_bucket" "default" {
Expand Down

0 comments on commit a1a5ce6

Please sign in to comment.