Skip to content

Commit

Permalink
Allow Fn::Transform inside a Fn::Sub (#3213)
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong authored May 3, 2024
1 parent f8b97dc commit 21786f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
17 changes: 9 additions & 8 deletions src/cfnlint/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,22 @@
FUNCTIONS = frozenset(
[
"Fn::Base64",
"Fn::Cidr",
"Fn::Contains",
"Fn::FindInMap",
"Fn::ForEach::[a-zA-Z0-9]+",
"Fn::GetAtt",
"Fn::GetAZs",
"Fn::If",
"Fn::ImportValue",
"Fn::Join",
"Fn::Split",
"Fn::FindInMap",
"Fn::Length",
"Fn::Select",
"Ref",
"Fn::If",
"Fn::Contains",
"Fn::Split",
"Fn::Sub",
"Fn::Cidr",
"Fn::Length",
"Fn::ToJsonString",
"Fn::ForEach::[a-zA-Z0-9]+",
"Fn::Transform",
"Ref",
]
)

Expand Down
5 changes: 3 additions & 2 deletions src/cfnlint/rules/functions/Sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ def __init__(self) -> None:
self._functions = [
"Fn::Base64",
"Fn::FindInMap",
"Fn::GetAZs",
"Fn::GetAtt",
"Fn::GetAZs",
"Fn::If",
"Fn::ImportValue",
"Fn::Join",
"Fn::Select",
"Fn::Sub",
"Ref",
"Fn::ToJsonString",
"Fn::Transform",
"Ref",
]

def schema(self, validator: Validator, instance: Any) -> Dict[str, Any]:
Expand Down

0 comments on commit 21786f7

Please sign in to comment.