Skip to content

Commit

Permalink
Fix CreateRDSSnapshot function by correct the args and params (#2584)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
viveksinghggits committed Jan 2, 2024
1 parent 838d719 commit ab2c446
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/function/create_rds_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ab2c446

Please sign in to comment.