cfn-lint version: cfn-lint 0.4.1
Description of issue.
When using the ${} syntax in a sub it doesn't ignore whitespace and throws an error, e.g.
"Resource": {
"Fn::Sub": "${ AppendNotificationWatchLambdaLogGroup.Arn}*"
}
Will throw the following error:
E1019 String parameter AppendNotificationWatchLambdaLogGroup.Arn not found in string for Resources/AppendNotificationWatchLambdaRolePolicy/Properties/PolicyDocument/Statement/0/Resource/Fn::Sub
When the whitespace is removed this works perfectly fine in cfn-lint (and always works in CloudFormation).
Good point. I will work on a fix for this. Thank you for the issue should have a fix shortly.
Great! Let me know if there is anything I can help with. At a quick glance I wasn't sure where to implement this in the code, so didn't send a PR. If you let me know which part this is implemented in I'm happy to send a PR
I think I got it and I made a few improvements along the way. I think the same issue exists for spaces at the end of the parameter so we do a complete strip (left and right side empty spaces removed).
Most helpful comment
Good point. I will work on a fix for this. Thank you for the issue should have a fix shortly.