-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(aws): Add new RDS check for deletion protection enabled on clusters #4738
feat(aws): Add new RDS check for deletion protection enabled on clusters #4738
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4738 +/- ##
==========================================
+ Coverage 89.06% 89.11% +0.04%
==========================================
Files 914 921 +7
Lines 27970 28140 +170
==========================================
+ Hits 24912 25077 +165
- Misses 3058 3063 +5 ☔ View full report in Codecov by Sentry. |
"RelatedUrl": "https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html", | ||
"Remediation": { | ||
"Code": { | ||
"CLI": "aws rds modify-db-instance --db-instance-identifier <db_instance_id> --deletion-protection --apply-immediately", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, change the CLI command for the cluster one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove the cluster logic from the check rds_instance_deletion_protection
, what do you think?
Yes, good point. We can do it the same way we did in #4730 |
f397b7e
to
36c1828
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏🏼
Context
This new check will verify that deletion protection is enabled for Amazon RDS DB clusters. Enabling deletion protection provides a critical safeguard against accidental or unauthorized deletions, ensuring that the clusters cannot be removed without explicitly disabling this setting first.
When you try to create a new RDS database, there is an option in the additional configuration that allows you to enable deletion protection with the following description: "Protects the database from being deleted accidentally. While this option is enabled, you can’t delete the database." This check verifies that every DB cluster has this option enabled.
Description
I added
rds_cluster_deletion_protection
with its respective unit test.License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.