Skip to content

Commit

Permalink
fix(securityGroup): groupRef in userIDGroupPairs references id instea…
Browse files Browse the repository at this point in the history
…d of name (#203)

Handles issues [#2101](aws-controllers-k8s/community#2101)

GroupId is populated instead of the groupName (which would be the same as the name passed in as reference) when using the groupRef solution.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
kejne authored Jun 28, 2024
1 parent fb85da2 commit e2327ad
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 26 deletions.
6 changes: 3 additions & 3 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2024-06-19T08:11:53Z"
build_date: "2024-06-27T13:04:57Z"
build_hash: 14cef51778d471698018b6c38b604181a6948248
go_version: go1.22.4
version: v0.34.0
api_directory_checksum: 7fd395ceb7d5d8e35906991c7348d3498f384741
api_directory_checksum: 1b53401670898ce50e6d6cc8bfba6b63ea7d5683
api_version: v1alpha1
aws_sdk_go_version: v1.44.93
generator_config_info:
file_checksum: 50dfb186094519e9534c5774690536b3e2474428
file_checksum: ff3f54d44dba872977fef4f23c5f766a1bebbbc2
original_file_name: generator.yaml
last_modification:
reason: API generation
6 changes: 3 additions & 3 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,10 @@ resources:
references:
resource: VPC
path: Status.VPCID
IngressRules.UserIDGroupPairs.GroupName:
IngressRules.UserIDGroupPairs.GroupID:
references:
resource: SecurityGroup
path: Spec.Name
path: Status.ID
is_required: false
renames:
operations:
Expand Down Expand Up @@ -849,4 +849,4 @@ resources:
sdk_read_many_post_set_output:
template_path: hooks/vpc_peering_connection/sdk_read_many_post_set_output.go.tpl
sdk_file_end:
template_path: hooks/vpc_peering_connection/sdk_file_end.go.tpl
template_path: hooks/vpc_peering_connection/sdk_file_end.go.tpl
2 changes: 1 addition & 1 deletion apis/v1alpha1/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/controller/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ kind: Kustomization
images:
- name: controller
newName: public.ecr.aws/aws-controllers-k8s/ec2-controller
newTag: 1.2.12
newTag: 1.2.12
4 changes: 2 additions & 2 deletions config/crd/bases/ec2.services.k8s.aws_securitygroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:
groupName:
type: string
groupRef:
description: Reference field for GroupName
description: Reference field for GroupID
properties:
from:
description: |-
Expand Down Expand Up @@ -217,7 +217,7 @@ spec:
groupName:
type: string
groupRef:
description: Reference field for GroupName
description: Reference field for GroupID
properties:
from:
description: |-
Expand Down
6 changes: 3 additions & 3 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,10 @@ resources:
references:
resource: VPC
path: Status.VPCID
IngressRules.UserIDGroupPairs.GroupName:
IngressRules.UserIDGroupPairs.GroupID:
references:
resource: SecurityGroup
path: Spec.Name
path: Status.ID
is_required: false
renames:
operations:
Expand Down Expand Up @@ -849,4 +849,4 @@ resources:
sdk_read_many_post_set_output:
template_path: hooks/vpc_peering_connection/sdk_read_many_post_set_output.go.tpl
sdk_file_end:
template_path: hooks/vpc_peering_connection/sdk_file_end.go.tpl
template_path: hooks/vpc_peering_connection/sdk_file_end.go.tpl
4 changes: 2 additions & 2 deletions helm/crds/ec2.services.k8s.aws_securitygroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:
groupName:
type: string
groupRef:
description: Reference field for GroupName
description: Reference field for GroupID
properties:
from:
description: |-
Expand Down Expand Up @@ -217,7 +217,7 @@ spec:
groupName:
type: string
groupRef:
description: Reference field for GroupName
description: Reference field for GroupID
properties:
from:
description: |-
Expand Down
1 change: 0 additions & 1 deletion helm/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{ .Chart.Name }} has been installed.

This chart deploys "public.ecr.aws/aws-controllers-k8s/ec2-controller:1.2.12".

Check its status by running:
Expand Down
20 changes: 10 additions & 10 deletions pkg/resource/security_group/references.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e2327ad

Please sign in to comment.