-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors after upgrading to v1.3 #3383
Comments
The issue here comes down to the Fn::Sub. This is invalid. Once we are evaluating the elements to a function we need to turn off strict type checking. The output type from the function has to be a string. Resources:
MyPolicy:
Type: AWS::IAM::ManagedPolicy
Properties:
PolicyDocument:
Version: '2012-10-17'
Statement:
Action: "*"
Resource: "*"
Effect: Allow
Parameter:
Type: AWS::SSM::Parameter
Properties:
Type: String
Value:
Fn::Sub:
- "${Value}"
- Value: !GetAtt MyPolicy.AttachmentCount |
@kddejong , thank you for the prompt response. v1.3.4 cleaned most of the errors. This section in outputs still fails though
Do you want a new ticket? Thanks again |
Nah here is good. Easy fix we just need to add Fn::Cidr as a supported function for the join. |
@kddejong , I tried v1.3.6, it now fails differently on the same output block
Since it's a conditional block, it should expect a valid string all the time, right? It's a runtime evaluation
|
CloudFormation Lint Version
1.3.3
What operating system are you using?
macOS
Describe the bug
after upgrade to v1.3, cfn-lint fails unexpectedly, It generates multiple errors
E1019 {'Ref': 'additionalSubnetBits'} is not of type 'integer' when 'Ref' is resolved when 'Ref' is resolved
E3024 {'Ref': 'additionalSubnetBits'} is not of type 'integer' when 'Ref' is resolved when 'Ref' is resolved
E1020 {'Ref': 'additionalSubnetBits'} is not of type 'integer' when 'Ref' is resolved
There are identical Select functions, one in !If function passes , but the line in !Sub function fails
The code is deployed in CloudFormation, so we know it's valid
Expected behavior
Code is valid, cfn-lint shouldn't fail
Reproduction template
The text was updated successfully, but these errors were encountered: