File tree 4 files changed +80
-0
lines changed
4 files changed +80
-0
lines changed Original file line number Diff line number Diff line change 4
4
cfn-lint test/fixtures/templates/integration/dynamic-references.yaml -e -c I --format json > test/fixtures/results/integration/dynamic-references.json
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
+ cfn-lint test/fixtures/templates/integration/availability-zones.yaml -e -c I --format json > test/fixtures/results/integration/availability-zones.json
7
8
8
9
# public/
9
10
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
+ "Filename" : " test/fixtures/templates/integration/availability-zones.yaml" ,
4
+ "Id" : " 5ed67959-64ec-2c99-379b-b9c9cc0afea2" ,
5
+ "Level" : " Error" ,
6
+ "Location" : {
7
+ "End" : {
8
+ "ColumnNumber" : 25 ,
9
+ "LineNumber" : 5
10
+ },
11
+ "Path" : [
12
+ " Resources" ,
13
+ " Subnet" ,
14
+ " Properties" ,
15
+ " AvailabilityZoneId"
16
+ ],
17
+ "Start" : {
18
+ "ColumnNumber" : 7 ,
19
+ "LineNumber" : 5
20
+ }
21
+ },
22
+ "Message" : " 'AvailabilityZoneId' should not be included with 'AvailabilityZone'" ,
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/availability-zones.yaml" ,
33
+ "Id" : " de15b593-58fc-a138-446a-c62c4803d10e" ,
34
+ "Level" : " Error" ,
35
+ "Location" : {
36
+ "End" : {
37
+ "ColumnNumber" : 23 ,
38
+ "LineNumber" : 6
39
+ },
40
+ "Path" : [
41
+ " Resources" ,
42
+ " Subnet" ,
43
+ " Properties" ,
44
+ " AvailabilityZone"
45
+ ],
46
+ "Start" : {
47
+ "ColumnNumber" : 7 ,
48
+ "LineNumber" : 6
49
+ }
50
+ },
51
+ "Message" : " 'AvailabilityZone' should not be included with 'AvailabilityZoneId'" ,
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
+ AWSTemplateFormatVersion : ' 2010-09-09'
2
+ Resources :
3
+ Subnet :
4
+ Properties :
5
+ AvailabilityZoneId : use1-az1
6
+ AvailabilityZone :
7
+ Fn::Select :
8
+ - 0
9
+ - Fn::GetAZs : " "
10
+ CidrBlock : 10.0.0.0/20
11
+ VpcId : vpc-abc12345
12
+ Type : " AWS::EC2::Subnet"
Original file line number Diff line number Diff line change @@ -40,6 +40,13 @@ class TestQuickStartTemplates(BaseCliTestCase):
40
40
"results_filename" : ("test/fixtures/results/integration/metadata.json" ),
41
41
"exit_code" : 4 ,
42
42
},
43
+ {
44
+ "filename" : ("test/fixtures/templates/integration/availability-zones.yaml" ),
45
+ "results_filename" : (
46
+ "test/fixtures/results/integration/availability-zones.json"
47
+ ),
48
+ "exit_code" : 2 ,
49
+ },
43
50
]
44
51
45
52
def test_templates (self ):
You can’t perform that action at this time.
0 commit comments