Slipped in, shouldn't be here...
This commit is contained in:
parent
d678b79fce
commit
e2e7ee6d75
|
@ -167,6 +167,7 @@ func resourceCloudStackTemplateCreate(d *schema.ResourceData, meta interface{})
|
|||
|
||||
// Wait until the template is ready to use, or timeout with an error...
|
||||
currentTime := time.Now().Unix()
|
||||
timeout := int64(d.Get("is_ready_timeout").(int))
|
||||
for {
|
||||
err := resourceCloudStackTemplateRead(d, meta)
|
||||
if err != nil {
|
||||
|
@ -177,7 +178,7 @@ func resourceCloudStackTemplateCreate(d *schema.ResourceData, meta interface{})
|
|||
return nil
|
||||
}
|
||||
|
||||
if time.Now().Unix()-currentTime > d.Get("is_ready_timeout").(int) {
|
||||
if time.Now().Unix()-currentTime > timeout {
|
||||
return fmt.Errorf("Timeout while waiting for template to become ready")
|
||||
}
|
||||
time.Sleep(5 * time.Second)
|
||||
|
|
Loading…
Reference in New Issue