Skip to content

Commit

Permalink
nutanix#250 Set VM timeouts to highest previous values
Browse files Browse the repository at this point in the history
  • Loading branch information
Guy Newbury committed Feb 4, 2021
1 parent b6effee commit 84e1a77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nutanix/resource_nutanix_virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
)

var (
vmTimeout = 1 * time.Minute
vmDelay = 3 * time.Second
vmTimeout = 10 * time.Minute
vmDelay = 10 * time.Second
vmMinTimeout = 3 * time.Second
IDE = "IDE"
useHotAdd = true
Expand Down

1 comment on commit 84e1a77

@gabybeitler
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This functionality is already in the provider. In the code, there is a function setVMTimeout()

func setVMTimeout(meta interface{}) {
client := meta.(*Client)
if client.WaitTimeout != 0 {
vmTimeout = time.Duration(client.WaitTimeout) * time.Minute
}
}

The implementation of the code in the terraform file is:

provider "nutanix" {
wait_timeout = 2
insecure = true
port = 9440
}

when wait_timeout parameter is set the default times are replaced with the values from wait_timeout parameter.

Please sign in to comment.