Skip to content

S3 Invalid Attribute Combination warning #104

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

Open
ducksauz opened this issue May 19, 2025 · 0 comments
Open

S3 Invalid Attribute Combination warning #104

ducksauz opened this issue May 19, 2025 · 0 comments
Labels
bug 🐛 An issue with the system

Comments

@ducksauz
Copy link

Describe the Bug

I'm creating a Cloudtrail bucket and getting the following warning from the AWS provider due to the lifecycle config built into this module.

 Warning: Invalid Attribute Combination
│
│   with module.account_defaults.module.cloudtrail_s3_bucket.module.s3_bucket.module.aws_s3_bucket.aws_s3_bucket_lifecycle_configuration.default[0],
│   on .terraform/modules/account_defaults.cloudtrail_s3_bucket.s3_bucket.aws_s3_bucket/lifecycle.tf line 157, in resource "aws_s3_bucket_lifecycle_configuration" "default":
│  157: resource "aws_s3_bucket_lifecycle_configuration" "default" {
│
│ 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

The Terraform being used to call this module is:

module "cloudtrail_s3_bucket" {
  source = "cloudposse/cloudtrail-s3-bucket/aws"
  # Cloud Posse recommends pinning every module to a specific version
  version     = "0.27.0"
  namespace                     = var.cp_namespace
  stage                         = var.cp_stage
  name                          = var.cp_name
  lifecycle_rule_enabled        = true
  expiration_days               = 400
 }

Expected Behavior

Not to get a warning (looking to ward off future errors with this bug report)

Steps to Reproduce

Create a cloudtrail bucket with the above configuration

Screenshots

No response

Environment

Terraform: 1.11.4
AWS: 5.98.0
Cloudposse Cloudtrail-S3-Bucket: 0.27.0

Additional Context

No response

@ducksauz ducksauz added the bug 🐛 An issue with the system label May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant