Skip to content

Commit bd19c57

Browse files
committed
pass context to TransferSubGroup
1 parent 3bf3196 commit bd19c57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/provider/resource_gitlab_group.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ func resourceGitlabGroupUpdate(ctx context.Context, d *schema.ResourceData, meta
369369
}
370370

371371
if d.HasChange("parent_id") {
372-
diagnostic := transferSubGroup(d, client)
372+
diagnostic := transferSubGroup(ctx, d, client)
373373
if diagnostic.HasError() {
374374
return diagnostic
375375
}
@@ -378,7 +378,7 @@ func resourceGitlabGroupUpdate(ctx context.Context, d *schema.ResourceData, meta
378378
return resourceGitlabGroupRead(ctx, d, meta)
379379
}
380380

381-
func transferSubGroup(d *schema.ResourceData, meta interface{}) diag.Diagnostics {
381+
func transferSubGroup(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
382382
client := meta.(*gitlab.Client)
383383
o, n := d.GetChange("parent_id")
384384
parentId, ok := n.(int)
@@ -394,7 +394,7 @@ func transferSubGroup(d *schema.ResourceData, meta interface{}) diag.Diagnostics
394394
log.Printf("[DEBUG] turn gitlab group %s from %v to a new top-level group", d.Id(), o)
395395
}
396396

397-
_, _, err := client.Groups.TransferSubGroup(d.Id(), opt)
397+
_, _, err := client.Groups.TransferSubGroup(d.Id(), opt, gitlab.WithContext(ctx))
398398
if err != nil {
399399
return diag.Errorf("error transfering group %s to new parent group %v: %s", d.Id(), parentId, err)
400400
}

0 commit comments

Comments
 (0)