unbounce / iidy

iidy (Is it done yet?) -- CloudFormation with Confidence
MIT License
52 stars 7 forks source link

iidy v1.9.0 incorrectly considers nested functions as not allowed #186

Closed Kazzer closed 4 years ago

Kazzer commented 5 years ago

Errors:

error Root.Resources.IncomingCommandsSubscription.Properties.Region.If.2.Select.1.Split: can not be used within If [CfnFnsSupportedFnsValidator]  

Code: https://github.com/unbounce/lp-page-server-2/blob/master/infrastructure/resources/cfn-template.yaml#L110-L155

Expected: No errors for valid syntax

iidy incorrectly assumes that since Fn::Split is nested below an Fn::If, it must be invalid regardless of nest depth. Fn::Split is not valid directly within a Fn::If, but Fn::Split is allowed when nested in Fn::Select which is itself allowed when nested in Fn::If.

This issue prevents any usage of the template.

Kazzer commented 5 years ago

Also affects v1.7.0 and v1.8.0

tavisrudd commented 4 years ago

Fixed upstream. The next iidy release will include the fix.