-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.service/s3Issues and PRs that pertain to the s3 service.Issues and PRs that pertain to the s3 service.
Milestone
Description
Terraform and AWS Provider Version
OpenTofu v1.9.1
on linux_amd64hashicorp/aws 5.97
Affected Resource(s) or Data Source(s)
s3_bucket_lifecycle_configuration
Expected Behavior
It should be possible to specify an empty filter per the example in the documentation.
Actual Behavior
I see a warning that this will be an error in a future version of the provider.
Relevant Error/Panic Output
╷
│ Warning: Invalid Attribute Combination
│
│ with aws_s3_bucket_lifecycle_configuration.example,
│ on s3.tf line 16, in resource "aws_s3_bucket_lifecycle_configuration" "example":
│ 16: filter {}
│
│ No attribute specified when one (and only one) of
│ [rule[0].filter[0].prefix.<.object_size_greater_than,rule[0].filter[0].prefix.<.object_size_less_than,rule[0].filter[0].prefix.<.and,rule[0].filter[0].prefix.<.tag]
│ is required
│
│ This will be an error in a future version of the provider
│
│ (and one more similar warning elsewhere)
╵Sample Terraform Configuration
Click to expand configuration
resource "aws_s3_bucket_lifecycle_configuration" "example" {
bucket = aws_s3_bucket.bucket.id
rule {
id = "30-day-lifecycle"
filter {}
expiration {
days = 30
}
status = "Enabled"
}
}Steps to Reproduce
- Apply the configuration.
Debug Logging
Click to expand log output
GenAI / LLM Assisted Development
n/a
Important Facts and References
No response
Would you like to implement a fix?
No
jmuleiro, quixoticmonk and s-hashimo
Metadata
Metadata
Assignees
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.service/s3Issues and PRs that pertain to the s3 service.Issues and PRs that pertain to the s3 service.