Skip to content

Commit

Permalink
GCLOUD2-9399: Bug in updating interface with 'reserved_fixed_ip' type
Browse files Browse the repository at this point in the history
  • Loading branch information
shelomentsevd authored and alexk53 committed Feb 9, 2023
1 parent 1b36289 commit acfceca
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions gcore/resource_gcore_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -841,23 +841,9 @@ func resourceInstanceUpdate(ctx context.Context, d *schema.ResourceData, m inter

taskID := results.Tasks[0]
log.Printf("[DEBUG] attach interface taskID: %s", taskID)
_, err = tasks.WaitTaskAndReturnResult(client, taskID, true, InstanceCreatingTimeout, func(task tasks.TaskID) (interface{}, error) {
taskInfo, err := tasks.Get(client, string(task)).Extract()
if err != nil {
return nil, fmt.Errorf("cannot get task with ID: %s. Error: %w, task: %+v", task, err, taskInfo)
}
portID, err := instances.ExtractInstancePortIDFromTask(taskInfo)
if err != nil {
return nil, fmt.Errorf("cannot retrieve instance port ID from task info: %w", err)
}
return portID, nil
},
)

if err != nil {
if err = tasks.WaitForStatus(client, string(taskID), tasks.TaskStateFinished, InstanceCreatingTimeout, true); err != nil {
return diag.FromErr(err)
}

}
}

Expand Down

0 comments on commit acfceca

Please sign in to comment.