Skip to content

Commit 849b209

Browse files
authored
Generate DBClusterSnapshot resource (#182)
This commit adds support for `DBClusterSnapshot` resources. Users can now create, delete and update `DBClusterSnapshots` for RDS cluster snapshots using the ACK RDS controller. - Implement resource manager for DBClusterSnapshot with Create, Delete, ReadOne and Update SDK calls - Add custom Update logic to sync tags - Check cluster snapshot status and requeue if cluster snapshot is not in 'available' state - Adds e2e tests By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent e6e32ec commit 849b209

33 files changed

+3111
-67
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2024-06-11T08:00:15Z"
2+
build_date: "2024-06-11T19:26:48Z"
33
build_hash: 14cef51778d471698018b6c38b604181a6948248
44
go_version: go1.22.3
55
version: v0.34.0
6-
api_directory_checksum: 3d96ec8d32c85751df2f90793645364459c63fb2
6+
api_directory_checksum: 471f6857e01011a1a487f29512fa093d340122d2
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.232
99
generator_config_info:
10-
file_checksum: 9d617a40bcd5f222f428fd01f450f7e41dbfbfee
10+
file_checksum: 00210e222c5049e16a3951f79273ec678156ed08
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/db_cluster_snapshot.go

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

apis/v1alpha1/generator.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ignore:
66
#- DBCluster
77
- DBClusterEndpoint
88
#- DBClusterParameterGroup
9-
- DBClusterSnapshot
9+
# DBClusterSnapshot
1010
#- DBInstance
1111
- DBInstanceReadReplica
1212
#- DBParameterGroup
@@ -27,6 +27,7 @@ ignore:
2727
# support them for the moment. They require some code-generator modifications.
2828
- "CreateDBSnapshotOutput.DBSnapshot.EngineVersion"
2929
- "CreateDBSnapshotOutput.DBSnapshot.OptionGroupName"
30+
- "DescribeDBClusterSnapshotsOutput.DBClusterSnapshots.TagList"
3031
operations:
3132
ModifyDBCluster:
3233
override_values:
@@ -476,4 +477,19 @@ resources:
476477
sdk_read_many_post_set_output:
477478
template_path: hooks/db_snapshot/sdk_read_many_post_set_output.go.tpl
478479
sdk_update_pre_build_request:
479-
template_path: hooks/db_snapshot/sdk_update_pre_build_request.go.tpl
480+
template_path: hooks/db_snapshot/sdk_update_pre_build_request.go.tpl
481+
DBClusterSnapshot:
482+
fields:
483+
DBClusterSnapshotIdentifier:
484+
is_primary_key: true
485+
DBClusterIdentifier:
486+
references:
487+
resource: DBCluster
488+
path: Spec.DBClusterIdentifier
489+
hooks:
490+
sdk_create_post_set_output:
491+
template_path: hooks/db_cluster_snapshot/sdk_create_post_set_output.go.tpl
492+
sdk_read_many_post_set_output:
493+
template_path: hooks/db_cluster_snapshot/sdk_read_many_post_set_output.go.tpl
494+
update_operation:
495+
custom_method_name: customUpdateDBClusterSnapshot

apis/v1alpha1/types.go

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

0 commit comments

Comments
 (0)