Consider enabling Bucket Lock for backup buckets
This issue is to investigate the Bucket Lock Cloud Storage feature and potentially configure all of our backup buckets with a bucket lock and retention policy. This could provide additional protection against potential threats to our Cloud SQL backups such as randsomware attacks.
One thing to note is that all of our backup buckets are current configured to use the Coldline storage class, meaning that all bucket objects are already subject to a minimum 90 day retention period. Therefore, any bucket lock/retention policies we configure as part of this issue should probably be for longer than 90 days.
Implementation
If it's decided that we want to configure bucket locks/retention policies, this looks like it will be an addition to the backup_cloud_sql_instance
function in __init__.py
whereby we can enable the policies for new buckets and also check that the policies are enabled for existing buckets.