From ab2c4460411b01e952bc32da44250572f7289a4e Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Tue, 2 Jan 2024 17:28:27 +0100 Subject: [PATCH] Fix `CreateRDSSnapshot` function by correct the args and params (#2584) While refactoring in one of the previous PRs we interchanged two params of a function and because of that we started getting into a problem of `DBInstanceIdentifier` not specified. This commit corrects that. --- pkg/function/create_rds_snapshot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/function/create_rds_snapshot.go b/pkg/function/create_rds_snapshot.go index 489faa6c79..7289b4fdfc 100644 --- a/pkg/function/create_rds_snapshot.go +++ b/pkg/function/create_rds_snapshot.go @@ -139,8 +139,8 @@ func createRDSSnapshot(ctx context.Context, instanceID string, dbEngine RDSDBEng return output, nil } -func createSnapshot(ctx context.Context, rdsCli *rds.RDS, snapshotID, dbEngine, instanceID string) (int64, error) { - log.WithContext(ctx).Print("Creating RDS snapshot", field.M{"SnapshotID": snapshotID}) +func createSnapshot(ctx context.Context, rdsCli *rds.RDS, snapshotID, instanceID, dbEngine string) (int64, error) { + log.WithContext(ctx).Print("Creating RDS snapshot", field.M{"SnapshotID": snapshotID, "InstanceID": instanceID}) var allocatedStorage int64 if !isAuroraCluster(dbEngine) { dbSnapshotOutput, err := rdsCli.CreateDBSnapshot(ctx, instanceID, snapshotID)