Skip to content

Commit

Permalink
chore(k8s): update bucket ownership controls
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjimenezcasas committed Apr 24, 2023
1 parent c7f52fe commit 30ad642
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions buckets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "bucket" {
resource "aws_s3_bucket_acl" "bucket" {
bucket = aws_s3_bucket.bucket.id
acl = "private"

depends_on = [aws_s3_bucket_ownership_controls.bucket-acl-ownership]
}

resource "aws_s3_bucket_ownership_controls" "bucket-acl-ownership" {
bucket = aws_s3_bucket.bucket.id
rule {
object_ownership = "BucketOwnerPreferred"
}
}

resource "aws_s3_bucket_versioning" "bucket" {
Expand Down

0 comments on commit 30ad642

Please sign in to comment.