Closed key closed 1 year ago
If you add these to your modules that create s3 buckets:
control_object_ownership = true
object_ownership = "ObjectWriter"
I.E.:
module "s3_one" {
source = "terraform-aws-modules/s3-bucket/aws"
version = "~> 3.11"
bucket = "s3-one-${random_pet.this.id}"
force_destroy = true
control_object_ownership = true
object_ownership = "ObjectWriter"
}
Seems to fix it. (Also use a recent version of terraform-aws-modules/s3-bucket/aws
)
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days
This issue was automatically closed because of stale in 10 days
I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
This issue has been resolved in version 3.2.2 :tada:
Description
I am trying to deliver S3 content over CloudFront, and I assumed that S3 authentication would be done using Origin Access Control (OAC), and I worked from the definition in the complete example.
Versions
Module version [Required]: 3.2.1
Terraform version: 1.4.2
Provider version(s): aws 4.63.0
Reproduction Code [Required]
I have commented out some definitions because Route53 is not available in my environment.
Yes. Workspace on Terraform Cloud.
Yes.
Expected behavior
The CloudFront Distribution should be created without any errors.
Actual behavior
Terraform apply does not succeed with the following error
Terminal Output Screenshot(s)
Additional context
I believe this is affected by a change in the default settings for AWS S3. This change was made in April 2023.
https://aws.amazon.com/about-aws/whats-new/2022/12/amazon-s3-automatically-enable-block-public-access-disable-access-control-lists-buckets-april-2023/?nc1=h_ls