-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cloudformation cannot delete AWS::RDS::DBSubnetGroup when DBInstance ist set to retain #5282
Comments
Hey @konstantinj , thanks for opening the issue. This is a tradeoff between the defaults, which we want to be safe (we don't want to people accidentally deleting their database), and the desire the experiment. Could perhaps changing Thanks, |
@skinny85 thanks for the clarification I just bumped on this today while testing CDK. I think it makes sense to leave I'm retesting with |
|
When the DatabaseCluster has its deletion policy set to 'Retain', an attempt to delete the stack containing it fails, as the DbSubnetGroup cannot be removed if it still points to an existing Cluster. To fix that, set the retention policy of DbSubnetGroup to 'Retain' if it is 'Retain' on the DatabaseCluster. Fixes aws#5282
When the DatabaseCluster has its deletion policy set to 'Retain', an attempt to delete the stack containing it fails, as the DbSubnetGroup cannot be removed if it still points to an existing Cluster. To fix that, set the retention policy of DbSubnetGroup to 'Retain' if it is 'Retain' on the DatabaseCluster. Fixes aws#5282
When the DatabaseCluster has its deletion policy set to 'Retain', an attempt to delete the stack containing it fails, as the DbSubnetGroup cannot be removed if it still points to an existing Cluster. To fix that, set the retention policy of DbSubnetGroup to 'Retain' if it is 'Retain' on the DatabaseCluster. Fixes #5282 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
When creating either a dbcluster or dbinstance with all options to default it is not possible to delete the cloudformation stack afterwards since the dbinstance is per default set to retain but cfn still tries to delete the AWS::RDS::DBSubnetGroup which is not possible because the instance depends on it.
Reproduction Steps
create a dbcuster or a dbinstance
Error Log
cloudformation will not finish the deletion and time out after 4 hours of trying.
Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: