-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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): copy_tags_to_snapshot option missing from DatabaseCluster class #12085
Comments
Thanks for opening the issue @aktungmak . Any chance of creating a PR adding this property to the Thanks, |
Hi Adam! While doing some further searching on this subject, I discovered that this is actually not supported in CloudFormation (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html) and indeed someone has already created a feature request (aws-cloudformation/cloudformation-coverage-roadmap#238). If I understand correctly, CDK can only use features that exist in CloudFormation so this cannot be resolved until the feature is added to CloudFormation. Or is there another way around this? |
Hey @aktungmak , in theory, the could provide that functionality with a CloudFormation Custom Resource. However, we usually reserve that for bigger features, as it requires deploying a Lambda function along with your Stack, which is a pretty large and expensive abstraction 🙂. Usually we don't do that for single properties like these. I'll add the |
Hi all, Looks like the property (aws-cloudformation/cloudformation-coverage-roadmap#238 (comment)) Does this mean this is ready for implementation? |
Yep @Bryconc. PRs are very much welcome, as always! https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md |
It looks like this property is available on Cluster now, so I think this issue can be closed: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.DatabaseClusterProps.html#copytagstosnapshot |
Yep, thanks @blimmer! |
|
The Question
The class
aws_cdk.aws_rds.DatabaseInstance
provides the keyword argumentcopy_tags_to_snapshot
in its constructor, to ensure that snapshots are created with the same tags as the database.However, the class
aws_cdk.aws_rds.DatabaseCluster
does not offer this option and this means that snapshots are created without tags.To verify this was the problem, I deployed the following stack and then checked the "Backup" section of the AWS console
and I could see that the option "Copy tags to snapshots" was set to "Disabled".
Expectation
The keyword argument
copy_tags_to_snapshot
is available in the constructor ofaws_cdk.aws_rds.DatabaseCluster
and it has the same behaviour as inaws_cdk.aws_rds.DatabaseInstance
.Environment
The text was updated successfully, but these errors were encountered: