Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PreviousGenerationInstanceType family string matching (#2558)
* fix(rule) - better approach for regex validation PreviousGenerationInstanceType rule is currently using a validation regex that is incorrectly targetting instance types like 'mac1.metal' due to 'c1' being found in 'mac1.' string Split instance type to find out which section is the family and then perform a full 'match' instead of a 'search' on it Family section may vary in position depending on the property attribute * test - update test case with new instance type * fix(rule): improve matching rule Switch back to a full regex search approach that accomodates properties like AWS::Redshift::Cluster NodeType without having to add exceptions to the rule if we ever want to validate those * fix(rule): missing capture group in regex Co-authored-by: Pat Myron <PatMyron@users.noreply.github.com> Co-authored-by: Pat Myron <PatMyron@users.noreply.github.com> Co-authored-by: Kevin DeJong <kddejong@amazon.com>
- Loading branch information