Skip to content

Commit

Permalink
fix: set sync_time_with_host to default to true (hashicorp#2120)
Browse files Browse the repository at this point in the history
Changed the value for `sync_time_with_host` to default to `true` for`r/vsphere_virtual_machine` in compliance with the default value provided by the UI.

Signed-off-by: Vasil Atanasov <[email protected]>
  • Loading branch information
vasilsatanasov authored Jan 23, 2024
1 parent a791e70 commit c0e3f00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions vsphere/virtual_machine_config_structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,21 @@ func schemaVirtualMachineConfigSpec() map[string]*schema.Schema {
"sync_time_with_host": {
Type: schema.TypeBool,
Optional: true,
Default: true,
Description: "Enable guest clock synchronization with the host. On vSphere 7.0 U1 and above, with only this setting the clock is synchronized on startup and resume. Requires VMware Tools to be installed.",
},
"sync_time_with_host_periodically": {
Type: schema.TypeBool,
Optional: true,
Description: "Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting `sync_time_with_host` is enough for periodic synchronization. Requires VMware Tools to be installed.",
},
"tools_upgrade_policy": {
Type: schema.TypeString,
Optional: true,
Default: string(types.UpgradePolicyManual),
Description: "Set the upgrade policy for VMware Tools. Can be one of `manual` or `upgradeAtPowerCycle`.",
ValidateFunc: validation.StringInSlice(virtualMachineUpgradePolicyAllowedValues, false),
},
"sync_time_with_host_periodically": {
Type: schema.TypeBool,
Optional: true,
Description: "Enable periodic clock synchronization with the host. Supported only on vSphere 7.0 U1 and above. On prior versions setting `sync_time_with_host` is enough for periodic synchronization. Requires VMware Tools to be installed.",
},
"run_tools_scripts_after_power_on": {
Type: schema.TypeBool,
Optional: true,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/virtual_machine.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ The following options control VMware Tools settings on the virtual machine:

* `run_tools_scripts_before_guest_standby` - (Optional) Enable pre-standby scripts to run when VMware Tools is installed. Default: `true`.

* `sync_time_with_host` - (Optional) Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default: `false`.
* `sync_time_with_host` - (Optional) Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. Default: `true`.

* `sync_time_with_host_periodically` - (Optional) Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting `sync_time_with_host` is will enable periodic synchronization. Requires VMware Tools to be installed. Default: `false`.

Expand Down

0 comments on commit c0e3f00

Please sign in to comment.