-
-
Notifications
You must be signed in to change notification settings - Fork 877
Description
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.

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.