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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Tell us about the bug
Trying to use Fn::If within Fn::ForEach to reference a condition but CloudFormation returns Transform AWS::LanguageExtensions failed with: Fn::If layout is incorrect
@mparana CloudFormation currently doesn't support an intrinsic function for the 1st parameter (the condition name) of the Fn::If intrinsic function.
For example, calling CreateStack on the template below would result in CreateStack failing with Template error: Fn::If requires a list argument with the first element being a condition:
Community Note
Tell us about the bug
Trying to use Fn::If within Fn::ForEach to reference a condition but CloudFormation returns
Transform AWS::LanguageExtensions failed with: Fn::If layout is incorrect
Docs state that Fn::If is supported within Fn::ForEach.
See Test cases section for scenarios and replication template.
Expected behavior
Template validates correctly, the conditions are recognized, and proceeds to create the resources.
Observed behavior
Stack events report
Transform AWS::LanguageExtensions failed with: Fn::If layout is incorrect
Test cases
Referencing
${Identifier}
variable with !Sub to form the condition name causes the error.If we hardcode the condition name (i.e. BackupCreateSecondaryVolume), the stack goes through with no problems,
Template
The text was updated successfully, but these errors were encountered: