Conversation
This was referenced Sep 5, 2020
…mmand (E3002/W3002) fixes #1683 According to #608, this documentation seems incomplete: https://docs.aws.amazon.com/cli/latest/reference/cloudformation/package.html so I used this as the source instead: https://github.com/aws/aws-cli/blob/master/awscli/customizations/cloudformation/artifact_exporter.py
kddejong
reviewed
Sep 8, 2020
| """ | ||
| templated_exceptions = { | ||
| 'AWS::ApiGateway::RestApi': ['BodyS3Location'], | ||
| 'AWS::ApiGateway::RestApi': ['S3Location'], |
| 'AWS::Lambda::Function': ['Code'], | ||
| 'AWS::Lambda::LayerVersion': ['Content'], | ||
| 'AWS::ElasticBeanstalk::ApplicationVersion': ['SourceBundle'], | ||
| 'AWS::StepFunctions::StateMachine': ['S3Location'], |
Contributor
There was a problem hiding this comment.
And this DefinitionS3Location or DefinitionS3Location
Contributor
Author
There was a problem hiding this comment.
As @asjohnston-asf caught here: "I don't appreciate any nuance of the property type being S3Location vs DefinitionS3Location", the name of the property in the template is actually different than the name of the property type in the Resource Specification
From testing, these rules seems to be parsing the name of the property differently because of this, hence the divergence between templated_exceptions in the two rules
kddejong
approved these changes
Sep 8, 2020
Contributor
kddejong
left a comment
There was a problem hiding this comment.
I got it now. We are using the resource spec name not the property name. That was an unfortunate chose but I get why its the way you did this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


fixes #1683
According to #608, this documentation seems incomplete, so I used this as the source instead
these other property types were already
String:Test template:
@kddejong any way this section can use
templated_exceptionskeys as well?https://github.com/aws-cloudformation/cfn-python-lint/blob/df4b7bc463d301b638f0e0274ed0e41d37239092/src/cfnlint/rules/resources/properties/PropertiesTemplated.py#L34-L38