-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fixed Bucket Policy chain dependency with Public Access Block #227
fix: Fixed Bucket Policy chain dependency with Public Access Block #227
Conversation
+1 |
Hello Guys, when will it be merged? |
Please provide the complete code snippet which reproduces the bug so that I can run it locally and experience the problem. |
## [3.10.0](terraform-aws-modules/terraform-aws-s3-bucket@v3.9.0...v3.10.0) (2023-04-27) ### Features * Add default Access Log Delivery Policy (same as ALB/NLB) to work since April 2023 ([terraform-aws-modules#230](terraform-aws-modules#230)) ([bafac30](terraform-aws-modules@bafac30))
343c7c8
to
d286df1
Compare
@antonbabenko |
Thank you for the PR, @Jean717p ! |
### [3.10.1](v3.10.0...v3.10.1) (2023-04-28) ### Bug Fixes * Fixed Bucket Policy chain dependency with Public Access Block ([#227](#227)) ([fa19074](fa19074))
This PR is included in version 3.10.1 🎉 |
FYI - With this version, I now see a cycle error │ Error: Cycle: module.test-basic-vpc.module.dns-query-logs-s3-bucket.module.s3_bucket.aws_s3_bucket_public_access_block.this[0], module.test-basic-vpc.module.dns-query-logs-s3-bucket.module.s3_bucket.aws_s3_bucket_policy.this[0] it appears that the aws_s3_bucket_public_access_block and the s3_bucket.aws_s3_bucket_policy have a cyclic dependency |
Thank you @Jean717p 👏 |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Following AWS update of April 2023 for S3 Bucket Public Access Block default values for resources created via api calls, buckets are now created with
block all public access
enabled by default.Motivation and Context
If a bucket is created with a public read policy, it will incur in 403 Access Denied caused by
block all public access
enabled at bucket creation, with the previous dependency chain the bucket policy gets created before theblock all public access
block.Example of public read bucket policy:
Inverting the dependency chain between
aws_s3_bucket_policy.this
andaws_s3_bucket_public_access_block.this
will solve this issue.Example to reproduce the issue
Obtained error
Breaking Changes
How Has This Been Tested?
examples/*
projectspre-commit run -a
on my pull request