diff --git a/src/cfnlint/data/DownloadsMetadata/23be708e675cb6098b08969e4dbbc3f54cfc32461d10e077e7e5de1fc25d8b8f.meta.json b/src/cfnlint/data/DownloadsMetadata/23be708e675cb6098b08969e4dbbc3f54cfc32461d10e077e7e5de1fc25d8b8f.meta.json index 8418c4d227..353dfeedee 100644 --- a/src/cfnlint/data/DownloadsMetadata/23be708e675cb6098b08969e4dbbc3f54cfc32461d10e077e7e5de1fc25d8b8f.meta.json +++ b/src/cfnlint/data/DownloadsMetadata/23be708e675cb6098b08969e4dbbc3f54cfc32461d10e077e7e5de1fc25d8b8f.meta.json @@ -1 +1 @@ -{"etag": "\"abbad2d61bce41659bca87b27e9ee78f\"", "url": "https://schema.cloudformation.us-gov-west-1.amazonaws.com/CloudformationSchema.zip"} +{"etag": "\"176f4e2894ec2acb6290a05a269e6140\"", "url": "https://schema.cloudformation.us-gov-west-1.amazonaws.com/CloudformationSchema.zip"} diff --git a/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupegress/__init__.py b/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupegress/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupegress/cfn_schemas.json b/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupegress/cfn_schemas.json new file mode 100644 index 0000000000..df695e4456 --- /dev/null +++ b/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupegress/cfn_schemas.json @@ -0,0 +1,11 @@ +[ + { + "op": "add", + "path": "/cfnSchema", + "value": [ + "aws_ec2_securitygroup/protocols_and_port_ranges_include", + "aws_ec2_securitygroup/protocols_and_port_ranges_exclude", + "aws_ec2_securitygroup/all_to_and_from_ports" + ] + } +] diff --git a/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupingress/cfn_schemas.json b/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupingress/cfn_schemas.json new file mode 100644 index 0000000000..df695e4456 --- /dev/null +++ b/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupingress/cfn_schemas.json @@ -0,0 +1,11 @@ +[ + { + "op": "add", + "path": "/cfnSchema", + "value": [ + "aws_ec2_securitygroup/protocols_and_port_ranges_include", + "aws_ec2_securitygroup/protocols_and_port_ranges_exclude", + "aws_ec2_securitygroup/all_to_and_from_ports" + ] + } +] diff --git a/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroup.json b/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroup.json index e525c8496d..ca718f0e66 100644 --- a/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroup.json +++ b/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroup.json @@ -59,14 +59,6 @@ "aws_ec2_securitygroup/protocols_and_port_ranges_exclude", "aws_ec2_securitygroup/all_to_and_from_ports" ], - "dependencies": { - "FromPort": [ - "ToPort" - ], - "ToPort": [ - "FromPort" - ] - }, "properties": { "CidrIp": { "type": "string" diff --git a/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroupegress.json b/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroupegress.json index 96c9486d88..4a4768a33f 100644 --- a/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroupegress.json +++ b/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroupegress.json @@ -1,5 +1,10 @@ { "additionalProperties": false, + "cfnSchema": [ + "aws_ec2_securitygroup/protocols_and_port_ranges_include", + "aws_ec2_securitygroup/protocols_and_port_ranges_exclude", + "aws_ec2_securitygroup/all_to_and_from_ports" + ], "createOnlyProperties": [ "/properties/IpProtocol", "/properties/DestinationSecurityGroupId", diff --git a/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroupingress.json b/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroupingress.json index 5d8b499115..8cc03634c2 100644 --- a/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroupingress.json +++ b/src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroupingress.json @@ -1,5 +1,10 @@ { "additionalProperties": false, + "cfnSchema": [ + "aws_ec2_securitygroup/protocols_and_port_ranges_include", + "aws_ec2_securitygroup/protocols_and_port_ranges_exclude", + "aws_ec2_securitygroup/all_to_and_from_ports" + ], "createOnlyProperties": [ "/properties/GroupName", "/properties/IpProtocol", diff --git a/src/cfnlint/data/schemas/providers/us_gov_east_1/aws-ec2-securitygroupegress.json b/src/cfnlint/data/schemas/providers/us_gov_east_1/aws-ec2-securitygroupegress.json index bda5e89487..354fdff38b 100644 --- a/src/cfnlint/data/schemas/providers/us_gov_east_1/aws-ec2-securitygroupegress.json +++ b/src/cfnlint/data/schemas/providers/us_gov_east_1/aws-ec2-securitygroupegress.json @@ -1,5 +1,10 @@ { "additionalProperties": false, + "cfnSchema": [ + "aws_ec2_securitygroup/protocols_and_port_ranges_include", + "aws_ec2_securitygroup/protocols_and_port_ranges_exclude", + "aws_ec2_securitygroup/all_to_and_from_ports" + ], "createOnlyProperties": [ "/properties/IpProtocol", "/properties/DestinationSecurityGroupId", diff --git a/src/cfnlint/data/schemas/providers/us_gov_west_1/aws-ec2-securitygroupegress.json b/src/cfnlint/data/schemas/providers/us_gov_west_1/aws-ec2-securitygroupegress.json index bda5e89487..354fdff38b 100644 --- a/src/cfnlint/data/schemas/providers/us_gov_west_1/aws-ec2-securitygroupegress.json +++ b/src/cfnlint/data/schemas/providers/us_gov_west_1/aws-ec2-securitygroupegress.json @@ -1,5 +1,10 @@ { "additionalProperties": false, + "cfnSchema": [ + "aws_ec2_securitygroup/protocols_and_port_ranges_include", + "aws_ec2_securitygroup/protocols_and_port_ranges_exclude", + "aws_ec2_securitygroup/all_to_and_from_ports" + ], "createOnlyProperties": [ "/properties/IpProtocol", "/properties/DestinationSecurityGroupId", diff --git a/test/unit/module/cfn_yaml/test_yaml.py b/test/unit/module/cfn_yaml/test_yaml.py index b38696e94e..3f3ce41f24 100644 --- a/test/unit/module/cfn_yaml/test_yaml.py +++ b/test/unit/module/cfn_yaml/test_yaml.py @@ -26,7 +26,7 @@ def setUp(self): }, "generic_bad": { "filename": "test/fixtures/templates/bad/generic.yaml", - "failures": 33, + "failures": 34, }, } diff --git a/test/unit/module/test_rules_collections.py b/test/unit/module/test_rules_collections.py index 70c9d25387..839751df6d 100644 --- a/test/unit/module/test_rules_collections.py +++ b/test/unit/module/test_rules_collections.py @@ -53,7 +53,7 @@ def test_fail_run(self): filename = "test/fixtures/templates/bad/generic.yaml" template = cfnlint.decode.cfn_yaml.load(filename) cfn = Template(filename, template, ["us-east-1"]) - expected_err_count = 36 + expected_err_count = 37 matches = [] matches.extend(self.rules.run(filename, cfn)) assert (