Skip to content

Commit 7200ca6

Browse files
Add subnetIDs after custom describe to fix spec.subnetIDs: Required value (#111)
**Issue #, if available:** aws-controllers-k8s/community#1725 **Description of changes:** - Adding the subnetIDs after the custom describe operation in order to populate the `spec.subnetIDs` field. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent cb50e3b commit 7200ca6

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2023-03-07T21:35:18Z"
2+
build_date: "2023-03-10T17:52:20Z"
33
build_hash: 910a8e0744a99c5c87d8c1615926985215a60d8c
44
go_version: go1.19
55
version: v0.24.3
66
api_directory_checksum: 885f952f7ca2ce7a676b9bbf8eb262de71de6238
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.93
99
generator_config_info:
10-
file_checksum: 2461349a2827ec98ae7440fbff3301c1effcfaf4
10+
file_checksum: 8b1f9e0bb52e26722d71cbd1ee3d489a0e3970c6
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ resources:
1818
from:
1919
operation: DescribeEvents
2020
path: Events
21+
hooks:
22+
sdk_read_many_post_set_output:
23+
template_path: hooks/cache_subnet_group/sdk_read_many_post_set_output.go.tpl
2124
ReplicationGroup:
2225
exceptions:
2326
terminal_codes:

generator.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ resources:
1818
from:
1919
operation: DescribeEvents
2020
path: Events
21+
hooks:
22+
sdk_read_many_post_set_output:
23+
template_path: hooks/cache_subnet_group/sdk_read_many_post_set_output.go.tpl
2124
ReplicationGroup:
2225
exceptions:
2326
terminal_codes:

pkg/resource/cache_subnet_group/sdk.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
for _, subnetIdIter := range ko.Status.Subnets {
3+
if subnetIdIter.SubnetIdentifier != nil {
4+
ko.Spec.SubnetIDs = append(ko.Spec.SubnetIDs, subnetIdIter.SubnetIdentifier)
5+
}
6+
}

0 commit comments

Comments
 (0)