You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're trying to move from v0 of cfn-lint to v1, but the current v1.5.0 immediately blows up with the following when trying to run it against our templates (v0 works just fine).
We using Transform at top-level of our templates, but cfn-lint doesn't seem to understand it is the same as Fn::Transform and throws nonsensical errors.
If Transform is given a list, cfn-lint immediately fails with:
ValueError: Transform must be a string
That error message makes no sense, because Transform can be a string OR an array. Which is confirmed by this next error - see below.
If Transform is given an array, cfn-lint throws E1001:
E1001 {'Name': 'SomeMacro', 'Parameters': {'SomeParam': 'something'}} is not of type 'string', 'array'
Which also makes no sense, because that object is indeed an array.
If we replace Transform with Fn::Transform cfn-lint works as expected. Both versions are valid and work correctly with CloudFormation.
Expected behavior
cfn-lint should treat Transform and Fn::Transform the same in situations where they are valid yaml. Or at least show better error messages if treating them the same is not possible.
CloudFormation Lint Version
1.5.0
What operating system are you using?
Mac
Describe the bug
We're trying to move from v0 of cfn-lint to v1, but the current v1.5.0 immediately blows up with the following when trying to run it against our templates (v0 works just fine).
We using
Transform
at top-level of our templates, but cfn-lint doesn't seem to understand it is the same asFn::Transform
and throws nonsensical errors.If
Transform
is given a list, cfn-lint immediately fails with:That error message makes no sense, because Transform can be a string OR an array. Which is confirmed by this next error - see below.
If
Transform
is given an array, cfn-lint throws E1001:Which also makes no sense, because that object is indeed an array.
If we replace
Transform
withFn::Transform
cfn-lint works as expected. Both versions are valid and work correctly with CloudFormation.Expected behavior
cfn-lint should treat
Transform
andFn::Transform
the same in situations where they are valid yaml. Or at least show better error messages if treating them the same is not possible.Reproduction template
Template with a list, that fails with
ValueError
:Template with single macro, so Transform gets an array:
The text was updated successfully, but these errors were encountered: