diff --git a/driver/driver.go b/driver/driver.go index 5003188..b1e3616 100644 --- a/driver/driver.go +++ b/driver/driver.go @@ -505,7 +505,7 @@ func (d *Driver) Create() error { d.ServerID = srv.Server.ID log.Infof(" -> Server %s[%d]: Waiting to come up...", srv.Server.Name, srv.Server.ID) - err = d.waitForRunningServer() + err = d.waitForInitialStartup(srv) if err != nil { return err } diff --git a/driver/setup.go b/driver/setup.go index d24710e..13a5af9 100644 --- a/driver/setup.go +++ b/driver/setup.go @@ -32,6 +32,16 @@ func (d *Driver) waitForRunningServer() error { return nil } +func (d *Driver) waitForInitialStartup(srv hcloud.ServerCreateResult) error { + if srv.NextActions != nil && len(srv.NextActions) != 0 { + if err := d.waitForMultipleActions("server.NextActions", srv.NextActions); err != nil { + return fmt.Errorf("could not wait for NextActions: %w", err) + } + } + + return d.waitForRunningServer() +} + func (d *Driver) makeCreateServerOptions() (*hcloud.ServerCreateOpts, error) { pgrp, err := d.getPlacementGroup() if err != nil {