-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Bug]: aws_s3_bucket_lifecycle_configuration using recommended empty filter issues warning #41710
Comments
Community GuidelinesThis comment is added to every new Issue to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Volunteering to Work on This Issue
|
I'm seeing the same with version 5.90.0 of the provider. I'm guessing it's caused by the change in #40796. |
We've run into this issue today. For what it's worth we were bumping from 5.89.0 which didn't exhibit this behaviour so it does look like it may be down to the change @Tenzer mentioned. |
Using provider 5.90.0 I also get a similar warning when completely omitting the "filter" option:
My understanding from the docs is that omitting both filter and prefix from the rule is the recommended way to create a rule that applies to all objects in the bucket. I take the docs to say that specifying an empty filter applies the rule to objects with an empty string as a prefix (whatever that means), but that omitting the filter applies the rule to all objects. |
looks like it is from https://github.com/hashicorp/terraform-provider-aws/pull/41662/files |
quite frustrating since I was finally able to refactor my s3 module to not create a |
Guess I'm staying on 5.89.0 until this gets addressed :) |
Terraform Core Version
1.10.5
AWS Provider Version
5.90.0
Affected Resource(s)
aws_s3_bucket_lifecycle_configuration
Expected Behavior
When using the aws_s3_bucket_lifecycle_configuration resource the documentation recommends using an empty filter block for rules which apply to the entire bucket.
Actual Behavior
The planner issues a warning
Relevant Error/Panic Output Snippet
Terraform Configuration Files
resource "aws_s3_bucket_lifecycle_configuration" "lifecycle_sensitive_access_log" {
bucket = aws_s3_bucket.collector_bucket_sensitive_access_log.id
rule {
id = "Delete"
status = "Enabled"
filter {}
expiration {
days = 366
}
}
}
Steps to Reproduce
Create a lifecycle configuration with a rule using an empty filter block
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: