v0.39.0
🚀 Enhancements
S3 Replication Improvements @alexjurkiewicz (#93)
Terraform plan impact
In order to support multiple S3 Bucket replication destinations, we must use the filter
in the replication rule, even if there is nothing to filter. The filter, even if empty, conflicts with the prefix
attribute of the rule (a v1 feature replaced in v2 with the filter). So we moved all prefix
settings into the filter. Therefore, you may see Terraform make a change like this:
Click to show plan
- rules {
- id = "replication-test"
- prefix = "/main"
- priority = 0
- status = "Enabled"
- destination {
- bucket = "arn:aws:s3:::replication-target"
- storage_class = "STANDARD"
}
- filter {}
- }
+ rules {
+ id = "replication-test"
+ priority = 0
+ status = "Enabled"
+ destination {
+ bucket = "arn:aws:s3:::replication-target"
+ storage_class = "STANDARD"
}
+ filter {
+ prefix = "/main"
+ tags = {}
+ }
+ }
Deprecation
To provide consistency in naming, the replication_rules
input has been deprecated in favor of s3_replication_rules
. Existing code will continue to work, but new users should use s3_replication_rules
and current users of replication_rules
should update their code to use s3_replication_rules
at their convenience.
what
@alexjurkiewicz
- Add support for multi-bucket S3 replication
- Add support for easily adding cross-account replication destination bucket policy statements
@korenyoni
- Add test for S3 bucket replication configuration to provide better code coverage
@Nuru
- Convert v1
prefix
to v2filter
to support multiple replication destinations - Rename
replication_rules
tos3_replication_rules
for consistency - Move testing to
us-east-2
region because that is where Cloud Posse prefers to do testing
why
- Module currently does not support multi-bucket S3 replication
- Adding cross-account replication destination bucket policy statements is currently a manual task with no site-specific uniqueness
references
- Replication was added in #56
- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket