diff --git a/moto/rds/models.py b/moto/rds/models.py index 289ec9906..3ce005e5e 100644 --- a/moto/rds/models.py +++ b/moto/rds/models.py @@ -37,7 +37,6 @@ class Database(object): self.source_db_identifier = kwargs.get("source_db_identifier") self.db_instance_class = kwargs.get('db_instance_class') self.port = kwargs.get('port') - self.db_instance_identifier = kwargs.get('db_instance_identifier') self.db_name = kwargs.get("db_name") self.publicly_accessible = kwargs.get("publicly_accessible") if self.publicly_accessible is None: @@ -65,6 +64,10 @@ class Database(object): # DBParameterGroupName # VpcSecurityGroupIds.member.N + @property + def physical_resource_id(self): + return self.db_instance_identifier + @property def address(self): return "{0}.aaaaaaaaaa.{1}.rds.amazonaws.com".format(self.db_instance_identifier, self.region) @@ -130,7 +133,7 @@ class Database(object): source_db_identifier = properties.get("SourceDBInstanceIdentifier") if source_db_identifier: # Replica - db_kwargs["source_db_identifier"] = source_db_identifier.db_instance_identifier + db_kwargs["source_db_identifier"] = source_db_identifier database = rds_backend.create_database_replica(db_kwargs) else: database = rds_backend.create_database(db_kwargs)