-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tools_upgrade_policy
argument to the vsphere_virtual_machine
resource
#1506
Conversation
@tenthirtyam Looks Good to me, there aren't any acceptance tests around the other similar attributes so fine with the PR as is, can you do another quick ad hoc test verifying it works, can you update from |
@appilon, can you rebase and I'll make the changes and retest? :) |
Addresses #1297 - Add `tools_upgrade_policy` argument to the `vsphere_virtual_machine` resource to set the upgrade policy for VMware Tools. One of `manual` or `upgradeAtPowerCycle`. Default: `manual` - Updates the `vsphere_virtual_machine` resource docs to include the tools_upgrade_policy` argument. Signed-off-by: Ryan Johnson <[email protected]>
rebased! |
First apply: + tools_upgrade_policy = "manual" State: "swap_placement_policy": "inherit",
"sync_time_with_host": true,
"sync_time_with_host_periodically": false,
"tools_upgrade_policy": "manual",
"uuid": "4202649b-1490-3806-e126-766d5d028350",
"vapp": null,
"vapp_transport": [],
"vbs_enabled": false,
"vvtd_enabled": false Second Apply with Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
~ update in-place
Terraform will perform the following actions:
# vsphere_virtual_machine.vm[0] will be updated in-place
~ resource "vsphere_virtual_machine" "vm" {
id = "42023007-224d-8ef9-1a84-5bfcd4013c3e"
name = "test-vm-1"
tags = []
~ tools_upgrade_policy = "manual" -> "upgradeAtPowerCycle"
# (66 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
vsphere_virtual_machine.vm[0]: Modifying... [id=42023007-224d-8ef9-1a84-5bfcd4013c3e]
vsphere_virtual_machine.vm[0]: Still modifying... [id=42023007-224d-8ef9-1a84-5bfcd4013c3e, 10s elapsed]
vsphere_virtual_machine.vm[0]: Still modifying... [id=42023007-224d-8ef9-1a84-5bfcd4013c3e, 20s elapsed]
vsphere_virtual_machine.vm[0]: Still modifying... [id=42023007-224d-8ef9-1a84-5bfcd4013c3e, 30s elapsed]
vsphere_virtual_machine.vm[0]: Still modifying... [id=42023007-224d-8ef9-1a84-5bfcd4013c3e, 40s elapsed]
vsphere_virtual_machine.vm[0]: Still modifying... [id=42023007-224d-8ef9-1a84-5bfcd4013c3e, 50s elapsed]
vsphere_virtual_machine.vm[0]: Still modifying... [id=42023007-224d-8ef9-1a84-5bfcd4013c3e, 1m0s elapsed]
vsphere_virtual_machine.vm[0]: Modifications complete after 1m4s [id=42023007-224d-8ef9-1a84-5bfcd4013c3e]
Apply complete! Resources: 0 added, 1 changed, 0 destroyed. "tools_upgrade_policy": "manual", ISSUES:
|
tools_upgrade_policy
argument to the vsphere_virtual_machine
resourcetools_upgrade_policy
argument to the vsphere_virtual_machine
resource
@tenthirtyam I will try and take a look at the resource code to see if I can deduce why the state is stale |
Thanks, @appilon - let me know if you want to sync up on this one early next week. 🚀 |
I dug into this a bit more and it's working as expected.
|
tools_upgrade_policy
argument to the vsphere_virtual_machine
resourcetools_upgrade_policy
argument to the vsphere_virtual_machine
resource
Would need to add to the list under Virtual Machine Reboot added in the recent update to |
Updates to `tools_upgrade_policy` description to include "Can be one of `manual` or `upgradeAtPowerCycle`"
Given that the behavior has precedent in |
This functionality has been released in v2.1.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
tools_upgrade_policy
argument to thevsphere_virtual_machine
resource to set the upgrade policy for VMware Tools. One ofmanual
orupgradeAtPowerCycle
. Default:manual
vsphere_virtual_machine
resource docs to include the tools_upgrade_policy` argument.Testing
Performed unit tests which included both positive and negative tests. All passed successfully.
Example:
Release Note
resource/virtual_machine
: Adds thetools_upgrade_policy
argument to to set the upgrade policy for VMware Tools. One ofmanual
orupgradeAtPowerCycle
. Default:manual
. Will force a reboot. GH-1506References
Closes: #1297