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

RDS: Missing default Snapshot deletion policy #3298

Closed
1 of 5 tasks
nmussy opened this issue Jul 12, 2019 · 3 comments · Fixed by #8023
Closed
1 of 5 tasks

RDS: Missing default Snapshot deletion policy #3298

nmussy opened this issue Jul 12, 2019 · 3 comments · Fixed by #8023
Assignees
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.

Comments

@nmussy
Copy link
Contributor

nmussy commented Jul 12, 2019

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.

  • I'm submitting a ...

    • 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior?
    If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce
    Both RDS Instance and Cluster classes use the RemovalPolicy enum for their removalPolicy property, which does not implement the default Snpashot option

  • What is the expected behavior (or behavior of feature suggested)?
    The Snapshot option should be available. Changing the default to Snapshot would also be preferable in my opinion.

  • What is the motivation / use case for changing the behavior or adding this feature?
    Fix gap, possibly gain consistence with CloudFormation's default value.

  • Please tell us about your environment:

    • CDK CLI Version: 1.0.0
    • Module Version: 1.0.0
    • OS: all
    • Language: all
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)

The CfnDeletionPolicy enum does implement the Snapshot option:

@nmussy nmussy added the needs-triage This issue or PR still needs to be triaged. label Jul 12, 2019
@NGL321 NGL321 added gap @aws-cdk/aws-rds Related to Amazon Relational Database and removed needs-triage This issue or PR still needs to be triaged. labels Jul 15, 2019
@NGL321
Copy link
Contributor

NGL321 commented Jul 15, 2019

Hi @nmussy,

Thank you for commenting and bringing this to our attention. I did a quick search and validated, this is indeed a gap. We will look into this problem as soon as we are able.

Thank you again, and please know that these contributions really help our project grow and improve. 😸

@skinny85 skinny85 self-assigned this Aug 12, 2019
@NGL321 NGL321 added feature-request A feature should be added or improved. and removed gap labels Oct 16, 2019
@skinny85 skinny85 assigned nija-at and unassigned skinny85 Feb 6, 2020
@nija-at nija-at added the effort/small Small work item – less than a day of effort label Feb 25, 2020
@paujim
Copy link

paujim commented Apr 23, 2020

Thank you for CDK I'm loving it.
Is there any update on this (Snapshot deletion policy)? Still happening on version 1.34.1

@guilarteH
Copy link

I just stumbled across this issue too. Default CDK behaviour is to "Retain" clusters and instances when it should actually be "Snapshot" according to Cloudformation documentation.
An interesting related link:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html

skinny85 added a commit to skinny85/aws-cdk that referenced this issue May 16, 2020
…ance to Snapshot

The 'Snapshot' retention policy is a special one used only for RDS.
It deletes the underlying resource, but before doing that,
creates a snapshot of it, so that the data is not lost.
Use the 'Snapshot' policy instead of 'Retain',
for the DatabaseCluster and DbInstance resources.

Fixes aws#3298

BREAKING CHANGE: the default retention policy for RDS Cluster and DbInstance is now 'Snapshot'
skinny85 added a commit to skinny85/aws-cdk that referenced this issue May 21, 2020
…ance to Snapshot

The 'Snapshot' retention policy is a special one used only for RDS.
It deletes the underlying resource, but before doing that,
creates a snapshot of it, so that the data is not lost.
Use the 'Snapshot' policy instead of 'Retain',
for the DatabaseCluster and DbInstance resources.

Fixes aws#3298

BREAKING CHANGE: the default retention policy for RDS Cluster and DbInstance is now 'Snapshot'
skinny85 added a commit to skinny85/aws-cdk that referenced this issue Jun 1, 2020
…ance to Snapshot

The 'Snapshot' retention policy is a special one used only for RDS.
It deletes the underlying resource, but before doing that,
creates a snapshot of it, so that the data is not lost.
Use the 'Snapshot' policy instead of 'Retain',
for the DatabaseCluster and DbInstance resources.

Fixes aws#3298

BREAKING CHANGE: the default retention policy for RDS Cluster and DbInstance is now 'Snapshot'
skinny85 added a commit that referenced this issue Jun 1, 2020
…ance to Snapshot (#8023)

The 'Snapshot' retention policy is a special one used only for RDS.
It deletes the underlying resource, but before doing that,
creates a snapshot of it, so that the data is not lost.
Use the 'Snapshot' policy instead of 'Retain',
for the DatabaseCluster and DbInstance resources.

Fixes #3298

BREAKING CHANGE: the default retention policy for RDS Cluster and DbInstance is now 'Snapshot'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants