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.
Issue #50
Introduce new rule
E3030
to check allowed values as mentioned in the documentation. Properties sometimes have a list of "allowed values" (e.g. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html#cfn-aws-ec2-vpc-instancetenancy).Allowed Values can now be specified using the new spec patched and ValueTypes. A few of these values are already part of the Spec files (https://github.com/awslabs/cfn-python-lint/blob/master/src/cfnlint/data/ExtendedSpecs/all/03_value_types.json#L145)
This PR will implements the rule that checks these values. Currently 2 types are covered by the rule: Values and Parameters (Ref's to Parameters with Allowed Values and/or a Default value)
This (currently) replaces the 2 existing hardcoded rules to check for the Lambda Runtimes. In the long run, when more values are added, more specific rule might become obsolete. (MVP!)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.