Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rds): cannot delete a stack with DbCluster set to 'Retain' #8110

Merged
merged 3 commits into from
Jun 1, 2020

Conversation

skinny85
Copy link
Contributor

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

@skinny85 skinny85 requested a review from nija-at May 20, 2020 23:18
@skinny85 skinny85 self-assigned this May 20, 2020
@skinny85 skinny85 added the pr/do-not-merge This PR should not be merged at this time. label May 20, 2020
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 20, 2020
@skinny85
Copy link
Contributor Author

This should probably wait until #8023 gets merged. So, adding the "do not merge" label.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 3507155
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@skinny85 skinny85 removed the pr/do-not-merge This PR should not be merged at this time. label Jun 1, 2020
@mergify
Copy link
Contributor

mergify bot commented Jun 1, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

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
@skinny85 skinny85 force-pushed the feat/rds-subnet-group-retain branch from 3507155 to aa04312 Compare June 1, 2020 21:22
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: aa04312
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jun 1, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 986d944
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 8a2401d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jun 1, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit c2e534e into aws:master Jun 1, 2020
@skinny85 skinny85 deleted the feat/rds-subnet-group-retain branch June 2, 2020 00:04
@skinny85 skinny85 added this to the RDS to 'developer preview' milestone Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cloudformation cannot delete AWS::RDS::DBSubnetGroup when DBInstance ist set to retain
3 participants