lacework / terraform-aws-cloudtrail

Terraform module for configuring an integration with Lacework and AWS for CloudTrail analysis
6 stars 21 forks source link

Ensure that S3 ACL components are created in correct order #123

Closed hadique closed 1 year ago

hadique commented 1 year ago

Amazon AWS recently enabled a change that disables all S3 ACLs by default. The current LW Terraform provider for Cloudtrail creates S3 ACLs in a fashion that frequently runs into a race-condition which prevents the proper construction of our S3 buckets. This PR applies a "depends_on" statement to the S3 ACLs we create in order to ensure that S3 components are created in the correct order.

Here's a link to the change AWS has made. https://aws.amazon.com/about-aws/whats-new/2022/12/amazon-s3-automatically-enable-block-public-access-disable-access-control-lists-buckets-april-2023/ Here's a link to a solution that we have incorporated into this PR: https://stackoverflow.com/questions/76049290/error-accesscontrollistnotsupported-when-trying-to-create-a-bucket-acl-in-aws

hadique commented 1 year ago

would love to see this PR get reviewed...

dmurray-lacework commented 1 year ago

Looks good, but looks like the is a conflict with to resolve before merging

hadique commented 1 year ago

there is a conflict. blame says the conflict was created after I submitted my PR. who's responsible for the fix? :-)