Open EugenKon opened 1 month ago
Voting for Prioritization
Volunteering to Work on This Issue
@EugenKon - Your latest issue applying the ACL is expected:
By default, all new buckets are created with the Bucket owner enforced setting applied and ACLs are disabled.
If you need ACLs, you can use the s3_bucket_ownership_controls resource to enable ACLs and then modify accordingly.
From your configuration, you can simply remove the ACL block all together as it is no longer needed to enforce ownership of objects (this is the default).
The old configuration works without any issues (warnings). Thus we expect it works in case we reuse that configuration and create the new cluster. But this scenario failed: copy/paste, terraform plan/apply.
If the current configuration will not work to deploy new cluster, then a warning should be issued to make uses know that they need to update theirs deprecated configuration, despite on it works for this cluster created a long time ago.
In case of emergency you can see that users will not be able to reuse their working configuration. They need to google info, fix it, but all of these will take time and could lead to money loss during this downtime. Instead of just simple terraform plan/apply
.
Terraform Core Version
v1.9.5
AWS Provider Version
v5.67.0
Affected Resource(s)
Expected Behavior
Our old cluster has the next configurtion:
This resource was created a long time ago and when we run terraform plan/apply we do not see any issues regarding that.
But according this documentation: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#argument-reference we should get warning that our configuration is outdated and we need to fix it.
Actual Behavior
We copied this configuration above and tried to create a new cluster, but got errors:
Relevant Error/Panic Output Snippet
Terraform Configuration Files
resource "aws_s3_bucket_acl" "planitar-public-releases" { bucket = aws_s3_bucket.planitar-public-releases.id expected_bucket_owner = data.aws_caller_identity.current.account_id }
Steps to Reproduce
You need the old cluster with this resource already created. During plan/apply you will not see any warning about required options were missed.
UPD
When I added
acl = "private"
to my configuration I got this error message: