From a9e75ef2b2963ac8102bdc30dd2aaa36029764f8 Mon Sep 17 00:00:00 2001 From: Kevin DeJong Date: Fri, 26 Apr 2024 08:41:52 -0700 Subject: [PATCH] Clean up retention period on rds instance (#3172) --- .../aws_rds_dbinstance/backupretentionperiod.json | 3 ++- test/unit/rules/resources/test_retentionperiod_rds.py | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cfnlint/data/schemas/extensions/aws_rds_dbinstance/backupretentionperiod.json b/src/cfnlint/data/schemas/extensions/aws_rds_dbinstance/backupretentionperiod.json index 536d76b676..583d0a1172 100644 --- a/src/cfnlint/data/schemas/extensions/aws_rds_dbinstance/backupretentionperiod.json +++ b/src/cfnlint/data/schemas/extensions/aws_rds_dbinstance/backupretentionperiod.json @@ -4,7 +4,8 @@ "Engine": { "pattern": "^(?!aurora).*$", "type": "string" - } + }, + "SourceDBInstanceIdentifier": false }, "required": [ "Engine" diff --git a/test/unit/rules/resources/test_retentionperiod_rds.py b/test/unit/rules/resources/test_retentionperiod_rds.py index 4110b2d0ef..41aefb9137 100644 --- a/test/unit/rules/resources/test_retentionperiod_rds.py +++ b/test/unit/rules/resources/test_retentionperiod_rds.py @@ -50,10 +50,15 @@ def validator(): "name,instance,expected", [ ( - "Valid version", + "Valid retention period", {"MessageRetentionPeriod": "90"}, [], ), + ( + "Valid with SourceDBInstanceIdentifier", + {"SourceDBInstanceIdentifier": "source-db"}, + [], + ), ( "Invalid when not specified", {