-
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.
Description
Terraform Core Version
1.11.1
AWS Provider Version
5.90.0
Affected Resource(s)
aws_s3_bucket_lifecycle_configuration
Expected Behavior
If I understand the provider docs correctly, it's recommend to omit both filter and prefix options from a rule that should apply to all objects in the bucket. If I do this I get such a rule in AWS, but "terraform apply" gives an "Invalid Attribute Combination" warning. No warning should be issued in this case.
Actual Behavior
The warning includes:
No attribute specified when one (and only one) of [rule[0].prefix.<.filter] is required
Relevant Error/Panic Output Snippet
Terraform Configuration Files
resource "aws_s3_bucket_lifecycle_configuration" "main" {
for_each = toset(local.data_bucket_types)
bucket = aws_s3_bucket.main[each.key].id
rule {
id = aws_s3_bucket.main[each.key].id
status = "Enabled"
expiration {
expired_object_delete_marker = true
}
noncurrent_version_expiration {
noncurrent_days = 90
newer_noncurrent_versions = 2
}
abort_incomplete_multipart_upload {
days_after_initiation = 10
}
}
}
Steps to Reproduce
Create a lifecycle configuration with no filter and no prefix
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
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.