From 26fa3f06f15da9ceeda3d10d40f489c83fac7b50 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Sat, 30 Oct 2021 17:37:08 -0400 Subject: [PATCH] Add `disabled` to `vsphere_ha_vm_overide` Addresses #1493 - Adds `disabled` to `vsphere_ha_vm_overide`. - Updates `vsphere_ha_vm_overide`resource docs to include `disabled`. - Updates `vsphere_ha_vm_overide`resource docs to vSphere 7.0 reference. Signed-off-by: Ryan Johnson --- vsphere/resource_vsphere_ha_vm_override.go | 1 + website/docs/r/ha_vm_override.html.markdown | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/vsphere/resource_vsphere_ha_vm_override.go b/vsphere/resource_vsphere_ha_vm_override.go index 4ff923992..35fec8fca 100644 --- a/vsphere/resource_vsphere_ha_vm_override.go +++ b/vsphere/resource_vsphere_ha_vm_override.go @@ -34,6 +34,7 @@ var vmOverrideClusterDasConfigInfoServiceStateAllowedValues = []string{ string(types.ClusterDasVmSettingsRestartPriorityMedium), string(types.ClusterDasVmSettingsRestartPriorityHigh), string(types.ClusterDasVmSettingsRestartPriorityHighest), + string(types.ClusterDasVmSettingsRestartPriorityDisabled), } var vmOverrideClusterVMStorageProtectionForPDLAllowedValues = []string{ diff --git a/website/docs/r/ha_vm_override.html.markdown b/website/docs/r/ha_vm_override.html.markdown index 7afcd59a5..fc0d85c17 100644 --- a/website/docs/r/ha_vm_override.html.markdown +++ b/website/docs/r/ha_vm_override.html.markdown @@ -17,7 +17,7 @@ while not affecting the rest of the cluster. For more information on vSphere HA, see [this page][ref-vsphere-ha-clusters]. -[ref-vsphere-ha-clusters]: https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.avail.doc/GUID-5432CA24-14F1-44E3-87FB-61D937831CF6.html +[ref-vsphere-ha-clusters]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.avail.doc/GUID-5432CA24-14F1-44E3-87FB-61D937831CF6.html ~> **NOTE:** This resource requires vCenter and is not available on direct ESXi connections. @@ -32,8 +32,8 @@ virtual machine in the cluster looked up by the Considering a scenario where this virtual machine is of high value to the application or organization for which it does its work, it's been determined in the event of a host failure, that this should be one of the first virtual -machines to be started by vSphere HA during recovery. Hence, its -[`ha_vm_restart_priority`](#ha_vm_restart_priority) as been set to `highest`, +machines to be started by vSphere HA during recovery. Hence, it +[`ha_vm_restart_priority`](#ha_vm_restart_priority) has been set to `highest`, which, assuming that the default restart priority is `medium` and no other virtual machine has been assigned the `highest` priority, will mean that this VM will be started before any other virtual machine in the event of host @@ -126,7 +126,7 @@ for an entire list of version restrictions. * `ha_vm_restart_priority` - (Optional) The restart priority for the virtual machine when vSphere detects a host failure. Can be one of - `clusterRestartPriority`, `lowest`, `low`, `medium`, `high`, or `highest`. + `clusterRestartPriority`, `lowest`, `low`, `medium`, `high`, `highest`, or `disabled`. Default: `clusterRestartPriority`. * `ha_vm_restart_timeout` - (Optional) The maximum time, in seconds, that vSphere HA will wait for this virtual machine to be ready. Use `-1` to