Skip to content

feat(backup): support RDS database cluster and serverless cluster#17971

Merged
mergify[bot] merged 5 commits intoaws:mainfrom
jumic:backup-rds
Jul 14, 2022
Merged

feat(backup): support RDS database cluster and serverless cluster#17971
mergify[bot] merged 5 commits intoaws:mainfrom
jumic:backup-rds

Conversation

@jumic
Copy link
Copy Markdown
Contributor

@jumic jumic commented Dec 11, 2021

Add methods fromRdsDatabaseCluster and fromRdsServerlessCluster to support RDS database cluster and serverless cluster in AWS Backup. In BackupableResourcesCollector, CfnDBCluster will be detected and added to the backup selection.

Missing unit tests for fromRdsDatabaseInstance were added as well.

Change behaviour of CfnDBInstance in BackupableResourcesCollector. Database instances will be added only if attribute dbClusterIdentifier is not set. In the current implementation, database instances of a database cluster will be added to the backup selection. In my point of view, it is not necessary to backup each database instance of a database cluster if the database cluster is selected. Please check if this change is correct and allowed.

Closes #16457.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Dec 11, 2021

@github-actions github-actions bot added the @aws-cdk/aws-rds Related to Amazon Relational Database label Dec 11, 2021
Comment on lines 43 to +53
if (node instanceof rds.CfnDBInstance) {
const dbInstance = node as rds.CfnDBInstance;
if (!dbInstance.dbClusterIdentifier) {
this.resources.push(Stack.of(node).formatArn({
service: 'rds',
resource: 'db',
arnFormat: ArnFormat.COLON_RESOURCE_NAME,
resourceName: node.ref,
}));
}
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this change is correct: Can we just change it? Or do we have to treat it as a breaking change and create a feature flag? (I feel more confident when we create a feature flag.)

@jumic jumic changed the title feat(backup): support RDS database cluster and serverless cluster feat(aws-backup): support RDS database cluster and serverless cluster Dec 11, 2021
@github-actions github-actions bot added the @aws-cdk/aws-backup Related AWS Backup label Dec 11, 2021
@jumic jumic changed the title feat(aws-backup): support RDS database cluster and serverless cluster feat(backup): support RDS database cluster and serverless cluster Dec 11, 2021
@skinny85 skinny85 removed the @aws-cdk/aws-rds Related to Amazon Relational Database label Dec 13, 2021
@skinny85 skinny85 removed their assignment Dec 13, 2021
@kaizencc kaizencc added effort/medium Medium work item – several days of effort p2 labels Jan 24, 2022
@kaizencc
Copy link
Copy Markdown
Contributor

I've marked this as p2, which means that I don't have time to review this right now. I'm going to unassign myself, but let's definitely track the original issue for +1s, and you can ping me to let me know if anything has changed.

@kaizencc kaizencc removed their assignment Feb 17, 2022
@rix0rrr rix0rrr added feature-request A feature should be added or improved. p2 and removed p2 effort/medium Medium work item – several days of effort @aws-cdk/aws-backup Related AWS Backup feature-request A feature should be added or improved. labels Mar 4, 2022
@TheRealAmazonKendra TheRealAmazonKendra changed the base branch from v1-main to main July 12, 2022 23:20
@github-actions github-actions bot added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. labels Jul 12, 2022
Copy link
Copy Markdown
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@TheRealAmazonKendra TheRealAmazonKendra added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Jul 14, 2022
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 14, 2022

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

@mergify mergify bot dismissed TheRealAmazonKendra’s stale review July 14, 2022 03:00

Pull request has been modified.

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 14, 2022

Thank you for contributing! Your pull request will be updated from main 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
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: d2e701e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit 53a6a47 into aws:main Jul 14, 2022
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 14, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-backup): BackupResource has limited support for Aurora RDS

6 participants