diff --git a/platform/api/azure/instance.go b/platform/api/azure/instance.go index 31c695278..affdc7de1 100644 --- a/platform/api/azure/instance.go +++ b/platform/api/azure/instance.go @@ -236,7 +236,9 @@ func (a *API) CreateInstance(name, sshkey, resourceGroup, storageAccount string, clean() return nil, err } - _, err = poller.PollUntilDone(context.TODO(), nil) + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) + defer cancel() + _, err = poller.PollUntilDone(ctx, nil) if err != nil { return &Machine{ID: name}, fmt.Errorf("PollUntilDone: %w", err) }