-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an issue when scanning metadata (#3596)
- Loading branch information
Showing
4 changed files
with
125 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
[ | ||
{ | ||
"Filename": "test/fixtures/templates/integration/metdata.yaml", | ||
"Id": "e020b5ec-4ab1-0eb4-b917-7729e96af1d2", | ||
"Level": "Warning", | ||
"Location": { | ||
"End": { | ||
"ColumnNumber": 16, | ||
"LineNumber": 9 | ||
}, | ||
"Path": [ | ||
"Metadata", | ||
"AWS::CloudFormation::Interface", | ||
"ParameterGroups", | ||
0, | ||
"Parameters", | ||
0 | ||
], | ||
"Start": { | ||
"ColumnNumber": 13, | ||
"LineNumber": 9 | ||
} | ||
}, | ||
"Message": "'Vpc' is not one of ['VpcId']", | ||
"ParentId": null, | ||
"Rule": { | ||
"Description": "Metadata Interface parameters actually exist", | ||
"Id": "W4001", | ||
"ShortDescription": "Metadata Interface parameters exist", | ||
"Source": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-interface.html" | ||
} | ||
}, | ||
{ | ||
"Filename": "test/fixtures/templates/integration/metdata.yaml", | ||
"Id": "a29b7c20-4cf5-0a50-3291-2606201bcde4", | ||
"Level": "Warning", | ||
"Location": { | ||
"End": { | ||
"ColumnNumber": 17, | ||
"LineNumber": 12 | ||
}, | ||
"Path": [ | ||
"Metadata", | ||
"cfn-lint", | ||
"config", | ||
"bad_checks" | ||
], | ||
"Start": { | ||
"ColumnNumber": 7, | ||
"LineNumber": 12 | ||
} | ||
}, | ||
"Message": "Additional properties are not allowed ('bad_checks' was unexpected)", | ||
"ParentId": null, | ||
"Rule": { | ||
"Description": "Metadata cfn-lint configuration has many values and we want to validate that", | ||
"Id": "W4005", | ||
"ShortDescription": "Validate cfnlint configuration in the Metadata", | ||
"Source": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-interface.html" | ||
} | ||
}, | ||
{ | ||
"Filename": "test/fixtures/templates/integration/metdata.yaml", | ||
"Id": "98830d26-133b-bdd8-e52a-f5a4d6a15cd8", | ||
"Level": "Warning", | ||
"Location": { | ||
"End": { | ||
"ColumnNumber": 8, | ||
"LineNumber": 17 | ||
}, | ||
"Path": [ | ||
"Parameters", | ||
"VpcId" | ||
], | ||
"Start": { | ||
"ColumnNumber": 3, | ||
"LineNumber": 17 | ||
} | ||
}, | ||
"Message": "Parameter VpcId not used.", | ||
"ParentId": null, | ||
"Rule": { | ||
"Description": "Making sure the parameters defined are used", | ||
"Id": "W2001", | ||
"ShortDescription": "Check if Parameters are Used", | ||
"Source": "https://github.com/aws-cloudformation/cfn-lint" | ||
} | ||
} | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
AWSTemplateFormatVersion: 2010-09-09 | ||
|
||
Metadata: | ||
AWS::CloudFormation::Interface: | ||
ParameterGroups: | ||
- Label: | ||
default: 'Vpc Parameters' | ||
Parameters: | ||
- Vpc | ||
cfn-lint: | ||
config: | ||
bad_checks: | ||
- E3002 | ||
|
||
Parameters: | ||
# Vpc Parameters | ||
VpcId: | ||
Description: VPC To Create Stack In | ||
Type: String | ||
|
||
Resources: {} |
This file contains 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