Skip to content

Commit c35fc09

Browse files
authored
Allow for secretsmanager dynamic refs in Parameter defaults (#3707)
1 parent cf66b46 commit c35fc09

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/cfnlint/rules/functions/DynamicReferenceSecretsManagerPath.py

+6
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ def validate(self, validator: Validator, s: Any, instance: Any, schema: Any):
2929
):
3030
return
3131

32+
if (
33+
validator.context.path.path[0] == "Parameters"
34+
and validator.context.path.path[2] == "Default"
35+
):
36+
return
37+
3238
yield ValidationError(
3339
(
3440
f"Dynamic reference {instance!r} to secrets manager can only be "

test/unit/rules/functions/test_dynamic_reference_secrets_manager_path.py

+6
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ def context(cfn):
4242
["Resources", "MyResource", "Properties", "LoginProfile", "Password"],
4343
[],
4444
),
45+
(
46+
"Valid secrets manager",
47+
"{{resolve:secretsmanager:Parameter}}",
48+
["Parameters", "MyParameter", "Default"],
49+
[],
50+
),
4551
(
4652
"Short list",
4753
"{{resolve:secretsmanager:Parameter}}",

0 commit comments

Comments
 (0)