RDS ReadReplicaDBInstanceIdentifiers and SourceDBInstanceIdentifier show db-name for cross-region replication
Currently in all cases, moto will use a database's name for the ReadReplicaDBInstanceIdentifiers and SourceDBInstanceIdentifier fields in the RDSBackend.
This aligns with AWS's states for same-region replication. However for cross-region replication, AWS provides full arns for ReadReplicaDBInstanceIdentifiers and SourceDBInstanceIdentifier. Moto does not reflect this behavior for cross-region replication.
Can we update this for cross-region support to ensure moto stores/uses the full arn for its DBInstanceIdentifiers?
Reproducible steps:
- Create a same-region replication (primary and replica in the same region) in AWS, and run a describe call on both the primary and replica. Notice both
SourceDBInstanceIdentifierandReadReplicaDBInstanceIdentifiersalign with just the database name - Create a cross-region replication (primary in one region, replica in a second region) in AWS, and run a describe call on both the primary and replica. Notice both
SourceDBInstanceIdentifierandReadReplicaDBInstanceIdentifiersalign with just the resource's full arn. - Create a cross-region replication using moto, and run a describe call on both the primary and replica. Notice both
SourceDBInstanceIdentifierandReadReplicaDBInstanceIdentifierscome back as the database name. (This does not align with AWS's behavior)
Thanks for raising this @Tmilly, and welcome to Moto - marking this as a bug.
PR's are always welcome, if you'd like to tackle this!