Skip to content
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

can't set storage_class to inherit the source object in replication rules #207

Open
NoaBM opened this issue Nov 27, 2023 · 0 comments
Open
Labels
bug 🐛 An issue with the system

Comments

@NoaBM
Copy link

NoaBM commented Nov 27, 2023

Describe the Bug

When creating s3 bucket with s3_replication_rules, the storage_class inside destination is always enabled as "STANDARD" and can't be set to null, when the null should use the source replication bucket.

Expected Behavior

storage_class for replication should not be set, and should be taken from the source replication bucket.

Steps to Reproduce

call the module with all relevant fields including the replication fields -

module "s3_bucket" {
    source                  = "cloudposse/s3-bucket/aws"
    version                 = "4.0.1"
    s3_replication_rules = [{
         destination = {
              storage_class = null
          }
     }]
}

see in aws console that the "Destination storage class" is set to Standard and not as it should be unmarked.
Screenshot 2023-11-27 at 14 07 31

Screenshots

No response

Environment

  • Terraform version - 1.5
  • module version - 4.0.1

Additional Context

I tested a fix to the module in variables.tf line 267 and changed it to - storage_class = optional(string, null), and it seems to work either if :

  • we don't send "storage_class" to the module at all, the result is inherited from the source bucket

  • we do send "storage_class = STANDARD" it's sets it to standard.

@NoaBM NoaBM added the bug 🐛 An issue with the system label Nov 27, 2023
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