Skip to content

Commit

Permalink
Allow for secretsmanager dynamic refs in Parameter defaults (#3707)
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong authored Sep 23, 2024
1 parent cf66b46 commit c35fc09
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ def validate(self, validator: Validator, s: Any, instance: Any, schema: Any):
):
return

if (
validator.context.path.path[0] == "Parameters"
and validator.context.path.path[2] == "Default"
):
return

yield ValidationError(
(
f"Dynamic reference {instance!r} to secrets manager can only be "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ def context(cfn):
["Resources", "MyResource", "Properties", "LoginProfile", "Password"],
[],
),
(
"Valid secrets manager",
"{{resolve:secretsmanager:Parameter}}",
["Parameters", "MyParameter", "Default"],
[],
),
(
"Short list",
"{{resolve:secretsmanager:Parameter}}",
Expand Down

0 comments on commit c35fc09

Please sign in to comment.