diff --git a/scripts/update_schemas_manually.py b/scripts/update_schemas_manually.py index ccd691b26d..1dbf7bf9bd 100755 --- a/scripts/update_schemas_manually.py +++ b/scripts/update_schemas_manually.py @@ -70,7 +70,7 @@ resource_type="AWS::AutoScaling::AutoScalingGroup", patches=[ Patch( - values={"enum": ["EC2", "ELB"]}, + values={"enum": ["EBS", "EC2", "ELB", "VPC_LATTICE"]}, path="/properties/HealthCheckType", ), Patch( @@ -837,6 +837,17 @@ ResourcePatch( resource_type="AWS::EC2::SecurityGroupEgress", patches=[ + Patch( + path="/", + values={ + "requiredXor": [ + "CidrIp", + "CidrIpv6", + "DestinationPrefixListId", + "DestinationSecurityGroupId", + ], + }, + ), Patch( path="/properties/FromPort", values={"minimum": -1}, diff --git a/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupegress/manual.json b/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupegress/manual.json index 2356fff2ee..87f5d61bda 100644 --- a/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupegress/manual.json +++ b/src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupegress/manual.json @@ -1,4 +1,14 @@ [ + { + "op": "add", + "path": "/requiredXor", + "value": [ + "CidrIp", + "CidrIpv6", + "DestinationPrefixListId", + "DestinationSecurityGroupId" + ] + }, { "op": "add", "path": "/properties/FromPort/minimum", diff --git a/src/cfnlint/data/schemas/providers/ap_southeast_4/aws-autoscaling-launchconfiguration.json b/src/cfnlint/data/schemas/providers/ap_southeast_4/aws-autoscaling-launchconfiguration.json index 948d4d8651..301319cc5b 100644 --- a/src/cfnlint/data/schemas/providers/ap_southeast_4/aws-autoscaling-launchconfiguration.json +++ b/src/cfnlint/data/schemas/providers/ap_southeast_4/aws-autoscaling-launchconfiguration.json @@ -173,7 +173,23 @@ "type": "string" }, "SecurityGroups": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "items": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "type": "string" }, "type": "array", diff --git a/src/cfnlint/data/schemas/providers/ap_southeast_5/aws-autoscaling-launchconfiguration.json b/src/cfnlint/data/schemas/providers/ap_southeast_5/aws-autoscaling-launchconfiguration.json index 948d4d8651..301319cc5b 100644 --- a/src/cfnlint/data/schemas/providers/ap_southeast_5/aws-autoscaling-launchconfiguration.json +++ b/src/cfnlint/data/schemas/providers/ap_southeast_5/aws-autoscaling-launchconfiguration.json @@ -173,7 +173,23 @@ "type": "string" }, "SecurityGroups": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "items": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "type": "string" }, "type": "array", diff --git a/src/cfnlint/data/schemas/providers/ap_southeast_7/aws-autoscaling-launchconfiguration.json b/src/cfnlint/data/schemas/providers/ap_southeast_7/aws-autoscaling-launchconfiguration.json index 948d4d8651..301319cc5b 100644 --- a/src/cfnlint/data/schemas/providers/ap_southeast_7/aws-autoscaling-launchconfiguration.json +++ b/src/cfnlint/data/schemas/providers/ap_southeast_7/aws-autoscaling-launchconfiguration.json @@ -173,7 +173,23 @@ "type": "string" }, "SecurityGroups": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "items": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "type": "string" }, "type": "array", diff --git a/src/cfnlint/data/schemas/providers/ca_west_1/aws-autoscaling-launchconfiguration.json b/src/cfnlint/data/schemas/providers/ca_west_1/aws-autoscaling-launchconfiguration.json index 948d4d8651..301319cc5b 100644 --- a/src/cfnlint/data/schemas/providers/ca_west_1/aws-autoscaling-launchconfiguration.json +++ b/src/cfnlint/data/schemas/providers/ca_west_1/aws-autoscaling-launchconfiguration.json @@ -173,7 +173,23 @@ "type": "string" }, "SecurityGroups": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "items": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "type": "string" }, "type": "array", diff --git a/src/cfnlint/data/schemas/providers/il_central_1/aws-autoscaling-launchconfiguration.json b/src/cfnlint/data/schemas/providers/il_central_1/aws-autoscaling-launchconfiguration.json index 948d4d8651..301319cc5b 100644 --- a/src/cfnlint/data/schemas/providers/il_central_1/aws-autoscaling-launchconfiguration.json +++ b/src/cfnlint/data/schemas/providers/il_central_1/aws-autoscaling-launchconfiguration.json @@ -173,7 +173,23 @@ "type": "string" }, "SecurityGroups": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "items": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "type": "string" }, "type": "array", 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 61bb5cc1cc..2d190627c0 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 @@ -61,6 +61,12 @@ "IpProtocol", "GroupId" ], + "requiredXor": [ + "CidrIp", + "CidrIpv6", + "DestinationPrefixListId", + "DestinationSecurityGroupId" + ], "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ec2.git", "tagging": { "cloudFormationSystemTags": false, diff --git a/src/cfnlint/data/schemas/providers/us_gov_east_1/aws-autoscaling-launchconfiguration.json b/src/cfnlint/data/schemas/providers/us_gov_east_1/aws-autoscaling-launchconfiguration.json index 948d4d8651..301319cc5b 100644 --- a/src/cfnlint/data/schemas/providers/us_gov_east_1/aws-autoscaling-launchconfiguration.json +++ b/src/cfnlint/data/schemas/providers/us_gov_east_1/aws-autoscaling-launchconfiguration.json @@ -173,7 +173,23 @@ "type": "string" }, "SecurityGroups": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "items": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "type": "string" }, "type": "array", diff --git a/src/cfnlint/data/schemas/providers/us_gov_west_1/aws-autoscaling-launchconfiguration.json b/src/cfnlint/data/schemas/providers/us_gov_west_1/aws-autoscaling-launchconfiguration.json index 948d4d8651..301319cc5b 100644 --- a/src/cfnlint/data/schemas/providers/us_gov_west_1/aws-autoscaling-launchconfiguration.json +++ b/src/cfnlint/data/schemas/providers/us_gov_west_1/aws-autoscaling-launchconfiguration.json @@ -173,7 +173,23 @@ "type": "string" }, "SecurityGroups": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "items": { + "anyOf": [ + { + "format": "AWS::EC2::SecurityGroup.Id" + }, + { + "format": "AWS::EC2::SecurityGroup.Name" + } + ], "type": "string" }, "type": "array",