Skip to content

Commit

Permalink
Add security group egress xor (#3926)
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong authored Jan 24, 2025
1 parent df9543e commit 9436909
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scripts/update_schemas_manually.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
[
{
"op": "add",
"path": "/requiredXor",
"value": [
"CidrIp",
"CidrIpv6",
"DestinationPrefixListId",
"DestinationSecurityGroupId"
]
},
{
"op": "add",
"path": "/properties/FromPort/minimum",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9436909

Please sign in to comment.