cloudtools / troposphere

troposphere - Python library to create AWS CloudFormation descriptions
BSD 2-Clause "Simplified" License
4.93k stars 1.45k forks source link

Modify `SourceDBInstanceIdentifier` validator to allow `BackupRetentionPeriod` #2116

Closed tnielsen2 closed 1 year ago

tnielsen2 commented 1 year ago

We use a read-replica MySQL instance to ingest data utilizing a SaaS vendor.

This SaaS vendor requires binary logging on the read-replica instance to enable the replication of data from the RR. When using CloudFormation, without the BackupRetentionPeriod, binary logging is disabled on the read-replica instance.

To enable binlogging using the current version of troposphere, a console change must be made post deployment, or an aws-cli call to enable backup retention from a non-zero value, due to incorrect invalid_replica_properties.

This is not ideal because any subsequent CloudFormation changes will revert this to a 0 value, breaking binlog configuration. This change is to be able to enable binary logging with CloudFormation.

AWS Documentation here validates that to enable binary logging, backup retention must be set to a non-zero value.

image

I have tested this in a sandbox environment using CloudFormation with MySQL RDS (non-Aurora) and demonstrated it is a possible, usable parameter as indicated in the screenshots below.

image

image

markpeek commented 1 year ago

Thank you for the explanation and PR.