Skip to content

Commit d2e2495

Browse files
authored
Go into Sub parameters to resolve foreach values (#2846)
1 parent 70857bd commit d2e2495

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/cfnlint/template/transforms/_language_extensions.py

+2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ def _walk(self, item: Any, params: MutableMapping[str, Any], cfn: Any):
150150
)
151151
if only_string:
152152
return obj[k][0]
153+
if len(v) == 2:
154+
obj[k][1] = self._walk(v[1], params, cfn)
153155
elif k == "Fn::FindInMap":
154156
try:
155157
mapping = _ForEachValueFnFindInMap(get_hash(v), v)

src/cfnlint/template/transforms/transform.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def transform(self, cfn: Any):
4949
return matches
5050
cfn.template = template
5151

52+
LOGGER.info("Transformed template: %s", cfn.template)
5253
cfn.graph = Graph(cfn)
5354
cfn.conditions = Conditions(cfn)
54-
LOGGER.info("Transformed template: %s", cfn.template)
5555
return matches

0 commit comments

Comments
 (0)