Skip to content

Commit f6f5e1b

Browse files
author
Tenglong Gu
committed
Fix adopted resource for db cluster param group and db subnet group
1 parent b0d7dad commit f6f5e1b

File tree

7 files changed

+39
-3
lines changed

7 files changed

+39
-3
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: "2022-07-11T21:43:34Z"
2+
build_date: "2022-07-12T23:15:01Z"
33
build_hash: d09bac5fa87cffd0028014833a5e7e786c0187dd
44
go_version: go1.18.2
55
version: v0.19.2-6-gd09bac5
66
api_directory_checksum: a60467e94dc7e76bf34ff50f21691507d576fefc
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.27
99
generator_config_info:
10-
file_checksum: bb74db41177efd5c2c2dee2b106ff4ad8e9adcdb
10+
file_checksum: 7c97381f2505016d3d383ddabd3a54042822914d
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,18 @@ resources:
134134
DescribeDBClusterParameterGroups:
135135
input_fields:
136136
DBClusterParameterGroupName: Name
137+
DBParameterGroupFamily: Family
137138
CreateDBClusterParameterGroup:
138139
input_fields:
139140
DBClusterParameterGroupName: Name
140141
DBParameterGroupFamily: Family
141142
DeleteDBClusterParameterGroup:
142143
input_fields:
143144
DBClusterParameterGroupName: Name
145+
ModifyDBClusterParameterGroup:
146+
input_fields:
147+
DBClusterParameterGroupName: Name
148+
DBParameterGroupFamily: Family
144149
update_operation:
145150
# We need a custom update implementation until the issue behind
146151
# https://github.com/aws-controllers-k8s/community/issues/869 is
@@ -306,14 +311,17 @@ resources:
306311
input_fields:
307312
DBSubnetGroupName: Name
308313
DBSubnetGroupDescription: Description
314+
Subnet.SubnetIdentifier: SubnetIDs
309315
CreateDBSubnetGroup:
310316
input_fields:
311317
DBSubnetGroupName: Name
312318
DBSubnetGroupDescription: Description
319+
Subnet.SubnetIdentifier: SubnetIDs
313320
ModifyDBSubnetGroup:
314321
input_fields:
315322
DBSubnetGroupName: Name
316323
DBSubnetGroupDescription: Description
324+
Subnet.SubnetIdentifier: SubnetIDs
317325
DeleteDBSubnetGroup:
318326
input_fields:
319327
DBSubnetGroupName: Name

generator.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,18 @@ resources:
134134
DescribeDBClusterParameterGroups:
135135
input_fields:
136136
DBClusterParameterGroupName: Name
137+
DBParameterGroupFamily: Family
137138
CreateDBClusterParameterGroup:
138139
input_fields:
139140
DBClusterParameterGroupName: Name
140141
DBParameterGroupFamily: Family
141142
DeleteDBClusterParameterGroup:
142143
input_fields:
143144
DBClusterParameterGroupName: Name
145+
ModifyDBClusterParameterGroup:
146+
input_fields:
147+
DBClusterParameterGroupName: Name
148+
DBParameterGroupFamily: Family
144149
update_operation:
145150
# We need a custom update implementation until the issue behind
146151
# https://github.com/aws-controllers-k8s/community/issues/869 is
@@ -306,14 +311,17 @@ resources:
306311
input_fields:
307312
DBSubnetGroupName: Name
308313
DBSubnetGroupDescription: Description
314+
Subnet.SubnetIdentifier: SubnetIDs
309315
CreateDBSubnetGroup:
310316
input_fields:
311317
DBSubnetGroupName: Name
312318
DBSubnetGroupDescription: Description
319+
Subnet.SubnetIdentifier: SubnetIDs
313320
ModifyDBSubnetGroup:
314321
input_fields:
315322
DBSubnetGroupName: Name
316323
DBSubnetGroupDescription: Description
324+
Subnet.SubnetIdentifier: SubnetIDs
317325
DeleteDBSubnetGroup:
318326
input_fields:
319327
DBSubnetGroupName: Name

pkg/resource/db_cluster_parameter_group/sdk.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/resource/db_instance/sdk.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/resource/db_subnet_group/sdk.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/hooks/db_subnet_group/sdk_read_many_post_set_output.go.tpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,11 @@
66
}
77
ko.Spec.Tags = tags
88
}
9+
10+
if ko.Status.Subnets != nil {
11+
for _, subnetIdIter := range ko.Status.Subnets {
12+
if subnetIdIter.SubnetIdentifier != nil {
13+
ko.Spec.SubnetIDs = append(ko.Spec.SubnetIDs, subnetIdIter.SubnetIdentifier)
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)