-
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.
Update requiredXor for Vpc and Subnets (#3734)
- Loading branch information
Showing
10 changed files
with
172 additions
and
1 deletion.
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
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 |
---|---|---|
|
@@ -13,6 +13,9 @@ | |
"value": { | ||
"Ipv4IpamPoolId": [ | ||
"Ipv4NetmaskLength" | ||
], | ||
"Ipv4NetmaskLength": [ | ||
"Ipv4IpamPoolId" | ||
] | ||
} | ||
} | ||
|
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
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,86 @@ | ||
[ | ||
{ | ||
"Filename": "test/fixtures/templates/integration/aws-ec2-subnet.yaml", | ||
"Id": "5c96f1f9-9dfc-31e7-f24b-9e08af46c98f", | ||
"Level": "Error", | ||
"Location": { | ||
"End": { | ||
"ColumnNumber": 15, | ||
"LineNumber": 7 | ||
}, | ||
"Path": [ | ||
"Resources", | ||
"Subnet1", | ||
"Properties" | ||
], | ||
"Start": { | ||
"ColumnNumber": 5, | ||
"LineNumber": 7 | ||
} | ||
}, | ||
"Message": "'Ipv4IpamPoolId' is a dependency of 'Ipv4NetmaskLength'", | ||
"ParentId": null, | ||
"Rule": { | ||
"Description": "When certain properties are specified it results in other properties to be required", | ||
"Id": "E3021", | ||
"ShortDescription": "Validate that when a property is specified that other properties should be included", | ||
"Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#dependentrequired" | ||
} | ||
}, | ||
{ | ||
"Filename": "test/fixtures/templates/integration/aws-ec2-subnet.yaml", | ||
"Id": "5c12a390-4b88-f609-d6d6-bd7fa2250f99", | ||
"Level": "Error", | ||
"Location": { | ||
"End": { | ||
"ColumnNumber": 15, | ||
"LineNumber": 13 | ||
}, | ||
"Path": [ | ||
"Resources", | ||
"Subnet2", | ||
"Properties" | ||
], | ||
"Start": { | ||
"ColumnNumber": 5, | ||
"LineNumber": 13 | ||
} | ||
}, | ||
"Message": "Only one of ['CidrBlock', 'Ipv4IpamPoolId'] is a required property", | ||
"ParentId": null, | ||
"Rule": { | ||
"Description": "Make sure that Resources properties that are required exist. Along with other properties not being specified", | ||
"Id": "E3014", | ||
"ShortDescription": "Validate only one of a set of required properties are specified", | ||
"Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#requiredxor" | ||
} | ||
}, | ||
{ | ||
"Filename": "test/fixtures/templates/integration/aws-ec2-subnet.yaml", | ||
"Id": "7a696880-e120-60b6-93b9-a57a48d71189", | ||
"Level": "Error", | ||
"Location": { | ||
"End": { | ||
"ColumnNumber": 15, | ||
"LineNumber": 17 | ||
}, | ||
"Path": [ | ||
"Resources", | ||
"Subnet3", | ||
"Properties" | ||
], | ||
"Start": { | ||
"ColumnNumber": 5, | ||
"LineNumber": 17 | ||
} | ||
}, | ||
"Message": "'Ipv4NetmaskLength' is a dependency of 'Ipv4IpamPoolId'", | ||
"ParentId": null, | ||
"Rule": { | ||
"Description": "When certain properties are specified it results in other properties to be required", | ||
"Id": "E3021", | ||
"ShortDescription": "Validate that when a property is specified that other properties should be included", | ||
"Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#dependentrequired" | ||
} | ||
} | ||
] |
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,19 @@ | ||
Parameters: | ||
Vpc: | ||
Type: AWS::EC2::VPC::Id | ||
Resources: | ||
Subnet1: | ||
Type: AWS::EC2::Subnet | ||
Properties: | ||
VpcId: !Ref Vpc | ||
CidrBlock: 10.0.0.0/24 | ||
Ipv4NetmaskLength: 10 | ||
Subnet2: | ||
Type: AWS::EC2::Subnet | ||
Properties: | ||
VpcId: !Ref Vpc | ||
Subnet3: | ||
Type: AWS::EC2::Subnet | ||
Properties: | ||
VpcId: !Ref Vpc | ||
Ipv4IpamPoolId: test |
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