File tree Expand file tree Collapse file tree 7 files changed +123
-0
lines changed
patches/extensions/all/aws_ec2_networkinterface Expand file tree Collapse file tree 7 files changed +123
-0
lines changed Original file line number Diff line number Diff line change 727
727
),
728
728
],
729
729
),
730
+ ResourcePatch (
731
+ resource_type = "AWS::EC2::NetworkInterface" ,
732
+ patches = [
733
+ Patch (
734
+ values = {
735
+ "dependentExcluded" : {
736
+ "Ipv6AddressCount" : ["Ipv6Addresses" ],
737
+ "Ipv6Addresses" : ["Ipv6AddressCount" ],
738
+ },
739
+ },
740
+ path = "/" ,
741
+ ),
742
+ ],
743
+ ),
730
744
ResourcePatch (
731
745
resource_type = "AWS::EC2::SecurityGroup" ,
732
746
patches = [
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ cfn-lint test/fixtures/templates/integration/dynamic-references.yaml -e -c I --f
5
5
cfn-lint test/fixtures/templates/integration/resources-cloudformation-init.yaml -e -c I --format json > test/fixtures/results/integration/resources-cloudformation-init.json
6
6
cfn-lint test/fixtures/templates/integration/ref-no-value.yaml -e -c I --format json > test/fixtures/results/integration/ref-no-value.json
7
7
cfn-lint test/fixtures/templates/integration/availability-zones.yaml -e -c I --format json > test/fixtures/results/integration/availability-zones.json
8
+ cfn-lint test/fixtures/templates/integration/aws-ec2-networkinterface.yaml -e -c I --format json > test/fixtures/results/integration/aws-ec2-networkinterface.json
8
9
9
10
# public/
10
11
cfn-lint test/fixtures/templates/public/lambda-poller.yaml -e -c I --format json > test/fixtures/results/public/lambda-poller.json
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "op" : " add" ,
4
+ "path" : " /dependentExcluded" ,
5
+ "value" : {
6
+ "Ipv6AddressCount" : [
7
+ " Ipv6Addresses"
8
+ ],
9
+ "Ipv6Addresses" : [
10
+ " Ipv6AddressCount"
11
+ ]
12
+ }
13
+ }
14
+ ]
Original file line number Diff line number Diff line change 96
96
"type" : " object"
97
97
}
98
98
},
99
+ "dependentExcluded" : {
100
+ "Ipv6AddressCount" : [
101
+ " Ipv6Addresses"
102
+ ],
103
+ "Ipv6Addresses" : [
104
+ " Ipv6AddressCount"
105
+ ]
106
+ },
99
107
"primaryIdentifier" : [
100
108
" /properties/Id"
101
109
],
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "Filename" : " test/fixtures/templates/integration/aws-ec2-networkinterface.yaml" ,
4
+ "Id" : " 9d40fd01-0117-1816-b924-0b0c89ee7a5e" ,
5
+ "Level" : " Error" ,
6
+ "Location" : {
7
+ "End" : {
8
+ "ColumnNumber" : 20 ,
9
+ "LineNumber" : 15
10
+ },
11
+ "Path" : [
12
+ " Resources" ,
13
+ " NetworkInterface" ,
14
+ " Properties" ,
15
+ " Ipv6Addresses"
16
+ ],
17
+ "Start" : {
18
+ "ColumnNumber" : 7 ,
19
+ "LineNumber" : 15
20
+ }
21
+ },
22
+ "Message" : " 'Ipv6Addresses' should not be included with 'Ipv6AddressCount'" ,
23
+ "ParentId" : null ,
24
+ "Rule" : {
25
+ "Description" : " When certain properties are specified other properties should not be included" ,
26
+ "Id" : " E3020" ,
27
+ "ShortDescription" : " Validate that when a property is specified another property should be excluded" ,
28
+ "Source" : " https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#dependentexcluded"
29
+ }
30
+ },
31
+ {
32
+ "Filename" : " test/fixtures/templates/integration/aws-ec2-networkinterface.yaml" ,
33
+ "Id" : " e26370d1-ed25-a14c-9a48-7cabc88945ec" ,
34
+ "Level" : " Error" ,
35
+ "Location" : {
36
+ "End" : {
37
+ "ColumnNumber" : 23 ,
38
+ "LineNumber" : 17
39
+ },
40
+ "Path" : [
41
+ " Resources" ,
42
+ " NetworkInterface" ,
43
+ " Properties" ,
44
+ " Ipv6AddressCount"
45
+ ],
46
+ "Start" : {
47
+ "ColumnNumber" : 7 ,
48
+ "LineNumber" : 17
49
+ }
50
+ },
51
+ "Message" : " 'Ipv6AddressCount' should not be included with 'Ipv6Addresses'" ,
52
+ "ParentId" : null ,
53
+ "Rule" : {
54
+ "Description" : " When certain properties are specified other properties should not be included" ,
55
+ "Id" : " E3020" ,
56
+ "ShortDescription" : " Validate that when a property is specified another property should be excluded" ,
57
+ "Source" : " https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#dependentexcluded"
58
+ }
59
+ }
60
+ ]
Original file line number Diff line number Diff line change
1
+ Parameters :
2
+ SubnetId :
3
+ Type : AWS::EC2::Subnet::Id
4
+ SecurityGroupId :
5
+ Type : AWS::EC2::SecurityGroup::Id
6
+ Resources :
7
+ NetworkInterface :
8
+ Type : AWS::EC2::NetworkInterface
9
+ Properties :
10
+ Description : " a network interface"
11
+ GroupSet :
12
+ - !Ref SecurityGroupId
13
+ SourceDestCheck : false
14
+ SubnetId : !Ref SubnetId
15
+ Ipv6Addresses :
16
+ - Ipv6Address : abc
17
+ Ipv6AddressCount : 1
Original file line number Diff line number Diff line change @@ -47,6 +47,15 @@ class TestQuickStartTemplates(BaseCliTestCase):
47
47
),
48
48
"exit_code" : 2 ,
49
49
},
50
+ {
51
+ "filename" : (
52
+ "test/fixtures/templates/integration/aws-ec2-networkinterface.yaml"
53
+ ),
54
+ "results_filename" : (
55
+ "test/fixtures/results/integration/aws-ec2-networkinterface.json"
56
+ ),
57
+ "exit_code" : 2 ,
58
+ },
50
59
]
51
60
52
61
def test_templates (self ):
You can’t perform that action at this time.
0 commit comments