How to configure s3 replication?
I'm trying to figure out how to configure with a cross-region cross-account bucket using the private-s3-bucket module. Do you have an example of how to do this? This change looks like it makes it easier (https://github.com/gruntwork-io/terraform-aws-security/pull/604) , but I'm still confused on how I'm supposed to setup the role and replication settings on the source bucket. --- <ins datetime="2022-05-26T14:44:41Z"> <p><a href="https://support.gruntwork.io/hc/requests/108666">Tracked in ticket #108666</a></p> </ins>
Check out [this example](https://github.com/gruntwork-io/terraform-aws-security/tree/master/examples/private-s3-bucket-with-replication) which sets up a replicating bucket in a single region. You can expand this example to use multiple regions by creating a secondary `aws` provider block configured to the alternate region and updating the `replication_s3_bucket` module block to use that provider instead. Refer to [the terraform documentation](https://www.terraform.io/language/providers/configuration#selecting-alternate-provider-configurations) for more info on how to setup and use alternate providers.