From b30f56a6ae76024a54884c14f02b5f7c516d1af9 Mon Sep 17 00:00:00 2001 From: Nick Adams Date: Tue, 11 Jul 2023 22:59:32 -0400 Subject: [PATCH] Fix for ACL changes --- main.tf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/main.tf b/main.tf index 58865bc..eac142b 100644 --- a/main.tf +++ b/main.tf @@ -90,23 +90,23 @@ resource "aws_s3_bucket" "this" { } } -resource "aws_s3_bucket_acl" "this" { +resource "aws_s3_bucket_ownership_controls" "this" { bucket = aws_s3_bucket.this.id - acl = "private" + + rule { + object_ownership = "BucketOwnerPreferred" + } depends_on = [ - aws_s3_bucket.this + aws_s3_bucket.this, ] } -resource "aws_s3_bucket_ownership_controls" "this" { +resource "aws_s3_bucket_acl" "this" { bucket = aws_s3_bucket.this.id - - rule { - object_ownership = "BucketOwnerEnforced" - } + acl = "private" depends_on = [ aws_s3_bucket.this, - aws_s3_bucket_acl.this + aws_s3_bucket_ownership_controls.this ] }