From a4c232cd728a9eed61f823a47c15ba8e0f2fa29c Mon Sep 17 00:00:00 2001 From: Daniel Sampaio Date: Thu, 27 Apr 2023 14:24:25 -0300 Subject: [PATCH] Sets Bucket ACL after its ownership controls were set --- main.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.tf b/main.tf index cd67bc5b..0e407150 100644 --- a/main.tf +++ b/main.tf @@ -185,6 +185,11 @@ resource "aws_s3_bucket_acl" "default" { } } } + + depends_on = [ + # ACL must be set after Ownership Controls were set + aws_s3_bucket_ownership_controls.default + ] } resource "aws_s3_bucket_replication_configuration" "default" {