Return W3002 instead of E3002 for additional resources supported by package command
See original GitHub issuecfn-lint version: cfn-lint 0.35.1
Some resources supported by aws cloudformation package
return E3002 Expecting an object...
; they should instead return W3002 This code may only work with package cli command...
when the resource value is a string.
Example:
$ cfn-lint --version
cfn-lint 0.35.1
$ cat myTemplate.yml
Resources:
myStateMachine:
Type: AWS::StepFunctions::StateMachine
Properties:
RoleArn: myRoleArn
DefinitionS3Location: myLocalDefinitionFile.json
$ cfn-lint myTemplate.yml
E3002 Expecting an object at Resources/myStateMachine/Properties/DefinitionS3Location
myTemplate.yml:7:7
My team is specifically interested in support for AWS::StepFunctions:StateMachine DefinitionS3Location
. We would prefer to use package
for our step function definitions so we can perform static analysis on the definition separate from the cloudformation template. That would currently require an --ignore-checks E3002
flag when validating the template, but we consider that check too critical to ignore.
Resources currently supported by package
are documented at:
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/package.html
Exceptions for some of these resources are implemented in cfn-lint
at:
https://github.com/aws-cloudformation/cfn-python-lint/blob/fe0af928a4ab26a6cedfd76564a26c9a4120b14f/src/cfnlint/rules/resources/properties/Properties.py#L179-L184
https://github.com/aws-cloudformation/cfn-python-lint/blob/fe0af928a4ab26a6cedfd76564a26c9a4120b14f/src/cfnlint/rules/resources/properties/PropertiesTemplated.py#L42-L47
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (1 by maintainers)
Thanks for the quick turnaround!
@stevehaneytrailblazer
Of course , you can ignore as work around if this problem can be fixed currently. But this is not the right way.
The problem here is, the definiation for this error , it is not error(Exxxx), it is changed to warning (Wxxxx)
Hope you get the point.
E3002 to W3002
But for Warning, should not fail the check.
echo $? is 4
means, the check is failed which is not