Skip to content

Commit 09a1b5c

Browse files
authored
Resolve egress rules cyclic dependencies for security groups (#229)
Issue #, if available: aws-controllers-k8s/community#2191 Description of changes: - generates the code for resolving egress rules SG references - updates integration tests to account for egress rules references By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 71c4318 commit 09a1b5c

File tree

6 files changed

+305
-115
lines changed

6 files changed

+305
-115
lines changed
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2024-10-10T04:00:51Z"
2+
build_date: "2024-10-22T13:52:25Z"
33
build_hash: 36c2d234498c2bc4f60773ab8df632af4067f43b
44
go_version: go1.23.2
55
version: v0.39.1
66
api_directory_checksum: 585098fc7c99c27ca523f83e860107d22aaa5a10
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.93
99
generator_config_info:
10-
file_checksum: cd7df4af2cf851dbae7c054c499c3c251064ab0c
10+
file_checksum: 2c5ef491ef62c9347bcb87918f715692adf727bc
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,16 @@ resources:
530530
path: Status.ID
531531
skip_resource_state_validations: true
532532
is_required: false
533+
EgressRules.UserIDGroupPairs.VPCID:
534+
references:
535+
resource: VPC
536+
path: Status.VPCID
537+
EgressRules.UserIDGroupPairs.GroupID:
538+
references:
539+
resource: SecurityGroup
540+
path: Status.ID
541+
skip_resource_state_validations: true
542+
is_required: false
533543
renames:
534544
operations:
535545
CreateSecurityGroup:

generator.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,16 @@ resources:
530530
path: Status.ID
531531
skip_resource_state_validations: true
532532
is_required: false
533+
EgressRules.UserIDGroupPairs.VPCID:
534+
references:
535+
resource: VPC
536+
path: Status.VPCID
537+
EgressRules.UserIDGroupPairs.GroupID:
538+
references:
539+
resource: SecurityGroup
540+
path: Status.ID
541+
skip_resource_state_validations: true
542+
is_required: false
533543
renames:
534544
operations:
535545
CreateSecurityGroup:

pkg/resource/security_group/references.go

+122-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/e2e/resources/security_group_with_sg_ref.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,12 @@ spec:
1515
groupRef:
1616
from:
1717
name: $SECURITY_GROUP_REF_NAME
18+
egressRules:
19+
- fromPort: 443
20+
toPort: 443
21+
ipProtocol: tcp
22+
userIDGroupPairs:
23+
- description: test UID group pair
24+
groupRef:
25+
from:
26+
name: $SECURITY_GROUP_REF_NAME

0 commit comments

Comments
 (0)