Skip to content

Commit 9436909

Browse files
authored
Add security group egress xor (#3926)
1 parent df9543e commit 9436909

File tree

10 files changed

+140
-1
lines changed

10 files changed

+140
-1
lines changed

scripts/update_schemas_manually.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
resource_type="AWS::AutoScaling::AutoScalingGroup",
7171
patches=[
7272
Patch(
73-
values={"enum": ["EC2", "ELB"]},
73+
values={"enum": ["EBS", "EC2", "ELB", "VPC_LATTICE"]},
7474
path="/properties/HealthCheckType",
7575
),
7676
Patch(
@@ -837,6 +837,17 @@
837837
ResourcePatch(
838838
resource_type="AWS::EC2::SecurityGroupEgress",
839839
patches=[
840+
Patch(
841+
path="/",
842+
values={
843+
"requiredXor": [
844+
"CidrIp",
845+
"CidrIpv6",
846+
"DestinationPrefixListId",
847+
"DestinationSecurityGroupId",
848+
],
849+
},
850+
),
840851
Patch(
841852
path="/properties/FromPort",
842853
values={"minimum": -1},

src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_securitygroupegress/manual.json

+10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
[
2+
{
3+
"op": "add",
4+
"path": "/requiredXor",
5+
"value": [
6+
"CidrIp",
7+
"CidrIpv6",
8+
"DestinationPrefixListId",
9+
"DestinationSecurityGroupId"
10+
]
11+
},
212
{
313
"op": "add",
414
"path": "/properties/FromPort/minimum",

src/cfnlint/data/schemas/providers/ap_southeast_4/aws-autoscaling-launchconfiguration.json

+16
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,23 @@
173173
"type": "string"
174174
},
175175
"SecurityGroups": {
176+
"anyOf": [
177+
{
178+
"format": "AWS::EC2::SecurityGroup.Id"
179+
},
180+
{
181+
"format": "AWS::EC2::SecurityGroup.Name"
182+
}
183+
],
176184
"items": {
185+
"anyOf": [
186+
{
187+
"format": "AWS::EC2::SecurityGroup.Id"
188+
},
189+
{
190+
"format": "AWS::EC2::SecurityGroup.Name"
191+
}
192+
],
177193
"type": "string"
178194
},
179195
"type": "array",

src/cfnlint/data/schemas/providers/ap_southeast_5/aws-autoscaling-launchconfiguration.json

+16
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,23 @@
173173
"type": "string"
174174
},
175175
"SecurityGroups": {
176+
"anyOf": [
177+
{
178+
"format": "AWS::EC2::SecurityGroup.Id"
179+
},
180+
{
181+
"format": "AWS::EC2::SecurityGroup.Name"
182+
}
183+
],
176184
"items": {
185+
"anyOf": [
186+
{
187+
"format": "AWS::EC2::SecurityGroup.Id"
188+
},
189+
{
190+
"format": "AWS::EC2::SecurityGroup.Name"
191+
}
192+
],
177193
"type": "string"
178194
},
179195
"type": "array",

src/cfnlint/data/schemas/providers/ap_southeast_7/aws-autoscaling-launchconfiguration.json

+16
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,23 @@
173173
"type": "string"
174174
},
175175
"SecurityGroups": {
176+
"anyOf": [
177+
{
178+
"format": "AWS::EC2::SecurityGroup.Id"
179+
},
180+
{
181+
"format": "AWS::EC2::SecurityGroup.Name"
182+
}
183+
],
176184
"items": {
185+
"anyOf": [
186+
{
187+
"format": "AWS::EC2::SecurityGroup.Id"
188+
},
189+
{
190+
"format": "AWS::EC2::SecurityGroup.Name"
191+
}
192+
],
177193
"type": "string"
178194
},
179195
"type": "array",

src/cfnlint/data/schemas/providers/ca_west_1/aws-autoscaling-launchconfiguration.json

+16
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,23 @@
173173
"type": "string"
174174
},
175175
"SecurityGroups": {
176+
"anyOf": [
177+
{
178+
"format": "AWS::EC2::SecurityGroup.Id"
179+
},
180+
{
181+
"format": "AWS::EC2::SecurityGroup.Name"
182+
}
183+
],
176184
"items": {
185+
"anyOf": [
186+
{
187+
"format": "AWS::EC2::SecurityGroup.Id"
188+
},
189+
{
190+
"format": "AWS::EC2::SecurityGroup.Name"
191+
}
192+
],
177193
"type": "string"
178194
},
179195
"type": "array",

src/cfnlint/data/schemas/providers/il_central_1/aws-autoscaling-launchconfiguration.json

+16
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,23 @@
173173
"type": "string"
174174
},
175175
"SecurityGroups": {
176+
"anyOf": [
177+
{
178+
"format": "AWS::EC2::SecurityGroup.Id"
179+
},
180+
{
181+
"format": "AWS::EC2::SecurityGroup.Name"
182+
}
183+
],
176184
"items": {
185+
"anyOf": [
186+
{
187+
"format": "AWS::EC2::SecurityGroup.Id"
188+
},
189+
{
190+
"format": "AWS::EC2::SecurityGroup.Name"
191+
}
192+
],
177193
"type": "string"
178194
},
179195
"type": "array",

src/cfnlint/data/schemas/providers/us_east_1/aws-ec2-securitygroupegress.json

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@
6161
"IpProtocol",
6262
"GroupId"
6363
],
64+
"requiredXor": [
65+
"CidrIp",
66+
"CidrIpv6",
67+
"DestinationPrefixListId",
68+
"DestinationSecurityGroupId"
69+
],
6470
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ec2.git",
6571
"tagging": {
6672
"cloudFormationSystemTags": false,

src/cfnlint/data/schemas/providers/us_gov_east_1/aws-autoscaling-launchconfiguration.json

+16
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,23 @@
173173
"type": "string"
174174
},
175175
"SecurityGroups": {
176+
"anyOf": [
177+
{
178+
"format": "AWS::EC2::SecurityGroup.Id"
179+
},
180+
{
181+
"format": "AWS::EC2::SecurityGroup.Name"
182+
}
183+
],
176184
"items": {
185+
"anyOf": [
186+
{
187+
"format": "AWS::EC2::SecurityGroup.Id"
188+
},
189+
{
190+
"format": "AWS::EC2::SecurityGroup.Name"
191+
}
192+
],
177193
"type": "string"
178194
},
179195
"type": "array",

src/cfnlint/data/schemas/providers/us_gov_west_1/aws-autoscaling-launchconfiguration.json

+16
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,23 @@
173173
"type": "string"
174174
},
175175
"SecurityGroups": {
176+
"anyOf": [
177+
{
178+
"format": "AWS::EC2::SecurityGroup.Id"
179+
},
180+
{
181+
"format": "AWS::EC2::SecurityGroup.Name"
182+
}
183+
],
176184
"items": {
185+
"anyOf": [
186+
{
187+
"format": "AWS::EC2::SecurityGroup.Id"
188+
},
189+
{
190+
"format": "AWS::EC2::SecurityGroup.Name"
191+
}
192+
],
177193
"type": "string"
178194
},
179195
"type": "array",

0 commit comments

Comments
 (0)