RDS: Allow enabling deletion protection for an RDS cluster #6944
Labels
@aws-cdk/aws-rds
Related to Amazon Relational Database
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
in-progress
This issue is being actively worked on.
Milestone
As of now, it doesn't appear that I can enable "Deletion Protection" for my RDS cluster via CDK.
There is an option provided in the
DatabaseInstanceNewProps
interface, but that's not exposed at the cluster level.I am able to turn this on via the console:
and it also is a supported value in the
AWS::RDS::DBCluster
CloudFormation template according to the docs.Use Case
I would like to prevent my production database cluster from being accidentally deleted due to a mistake in our CDK definitions. If a developer's intention is truly to delete the cluster, I'd like to require them to deploy a change disabling deletion protection, and then proceed with their delete.
Proposed Solution
I propose that we add an optional
deletionProtection?
boolean attribute toDatabaseClusterProps
. To match the default behavior of the CloudFormation template (and to provide better backwards compatibility), this property would befalse
by default (not specified in the CloudFormation template output at all). If the user specifiestrue
, we would emitDeletionProtection: true
in the produced CloudFormation template.Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: