So we have various TF configurations for different microservices. We are setting up disaster recovery and we would have 2 options. Provision the replica S3 bucket as part of the deployment of the primary (so when tf apply in primary region)? Or do it as part of the tf apply in the secondary region? Both options have their own pros/cons. Looking to see what most people do.
It’s tricker, of course, with DynamoDB because when setting up the replication, AWS itself creates the destination. So any in-TF references have to be region aware: if primary, create the table, if secondary, don’t create it. A ref would have to reference the resource element in the primary region, but in the secondary it would have to be a data element.