@@ -369,7 +369,7 @@ func resourceGitlabGroupUpdate(ctx context.Context, d *schema.ResourceData, meta
369
369
}
370
370
371
371
if d .HasChange ("parent_id" ) {
372
- diagnostic := transferSubGroup (d , client )
372
+ diagnostic := transferSubGroup (ctx , d , client )
373
373
if diagnostic .HasError () {
374
374
return diagnostic
375
375
}
@@ -378,7 +378,7 @@ func resourceGitlabGroupUpdate(ctx context.Context, d *schema.ResourceData, meta
378
378
return resourceGitlabGroupRead (ctx , d , meta )
379
379
}
380
380
381
- func transferSubGroup (d * schema.ResourceData , meta interface {}) diag.Diagnostics {
381
+ func transferSubGroup (ctx context. Context , d * schema.ResourceData , meta interface {}) diag.Diagnostics {
382
382
client := meta .(* gitlab.Client )
383
383
o , n := d .GetChange ("parent_id" )
384
384
parentId , ok := n .(int )
@@ -394,7 +394,7 @@ func transferSubGroup(d *schema.ResourceData, meta interface{}) diag.Diagnostics
394
394
log .Printf ("[DEBUG] turn gitlab group %s from %v to a new top-level group" , d .Id (), o )
395
395
}
396
396
397
- _ , _ , err := client .Groups .TransferSubGroup (d .Id (), opt )
397
+ _ , _ , err := client .Groups .TransferSubGroup (d .Id (), opt , gitlab . WithContext ( ctx ) )
398
398
if err != nil {
399
399
return diag .Errorf ("error transfering group %s to new parent group %v: %s" , d .Id (), parentId , err )
400
400
}
0 commit comments