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
{{ message }}
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.
This template is valid and works fine in CloudFormation.
However, cfn-lint gives critical error on this like
1 crit
Resource: Resources > S3Annotation > Properties > CorsConfiguration > CorsRules > 0 > AllowedOrigins
Message: Fn::If does not allow 0 as a nested function within an array
Documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html#intrinsic-function-reference-conditions-if
addError('crit',`Fn::If does not allow ${keys[0]} as a nested function within an array`,placeInTemplate,'Fn::If');
}
The text was updated successfully, but these errors were encountered:
exoego
changed the title
Fn::If gives false alarm on Array value of S3 Bucket CorsRule
Lint on Fn::If gives false alarm on Array value of S3 Bucket CorsRule
Apr 3, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
AllowdOrigins
properties for Amazon S3 Bucket CorsRule acceptsArray
value.My CF tempalte uses
Fn::If
to switchAllowedOrigins
depending on environment like below:This template is valid and works fine in CloudFormation.
However,
cfn-lint
gives critical error on this likeI think this is false alarm.
Suspect code is
cfn-lint/src/validator.ts
Lines 1528 to 1537 in 7975480
The text was updated successfully, but these errors were encountered: