-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Open
Labels
documentationIntroduces or discusses updates to documentation.Introduces or discusses updates to documentation.service/s3Issues and PRs that pertain to the s3 service.Issues and PRs that pertain to the s3 service.
Description
Documentation Link(s)
Description
The documentation currently states that "The filter configuration block must either be specified as the empty configuration block (filter {}) or with exactly one of prefix...". However, when you specify an empty filter{}
the provider now produces a warning after PR #41662.
resource "aws_s3_bucket_lifecycle_configuration" "lifecycle" {
bucket = aws_s3_bucket.my_bucket.id
rule {
id = "archive-all"
filter {}
status = "Enabled"
transition {
days = 90
storage_class = "STANDARD_IA"
}
}
}
Results in this warning as of 5.90.0:
│ Warning: Invalid Attribute Combination
│
│ with aws_s3_bucket_lifecycle_configuration.lifecycle,
│ on main.tf line 26, in resource "aws_s3_bucket_lifecycle_configuration" "lifecycle":
│ 26: 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)
Setting filter { prefix = "" }
fixes the warning. This should be mentioned in the documentation.
References
Would you like to implement a fix?
Yes
DArtagan, ganoze, jrobison-sb, chris3ware, hkobayash and 12 more
Metadata
Metadata
Assignees
Labels
documentationIntroduces or discusses updates to documentation.Introduces or discusses updates to documentation.service/s3Issues and PRs that pertain to the s3 service.Issues and PRs that pertain to the s3 service.