Skip to content
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 'power_state' attribute to reflect desired power state #15232

Closed
wants to merge 1 commit into from

Conversation

matt-deboer
Copy link
Contributor

@matt-deboer matt-deboer commented Jun 9, 2017

Adds a new power_state (string) attribute to vsphere_virtual_machine, with behavior as follows:

  • when ignored' (default): if the target vm is in a powered off` state, instead of crashing terrraform during read operations (the current behavior), an error will be thrown indicating that the vm must be powered on in order to properly read it's state via terraform.
  • when poweredOn: if the target vm is not in a powered on state, the vm will show as requiring a change to poweredOn; additionally, network interfaces will be reconstructed from the current (last known) state where they cannot be read from the govmomi api while the vm is not 'powered on'.

This fixes #13803 and #14910; see those issues for more details.

Notes:

  • If the machine is not in a poweredOn state AND power_state value is poweredOn AND there are changes to the networking configuration, those changes will not be listed in the things needing change, although the overall resource will show as needing change.

@matt-deboer matt-deboer changed the title WIP: add 'power_state' attribute to reflect desired power state add 'power_state' attribute to reflect desired power state Jun 10, 2017
@Freyert
Copy link

Freyert commented Jul 1, 2017

@matt-deboer the built in providers have been moved out of master. You will need to remake these changes over on https://github.com/terraform-providers/terraform-provider-vsphere

@matt-deboer
Copy link
Contributor Author

matt-deboer commented Jul 5, 2017 via email

@apparentlymart
Copy link
Contributor

I'm going to close this since it was migrated over to hashicorp/terraform-provider-vsphere#103. Thanks for doing, that, @matt-deboer!

@Xat59
Copy link

Xat59 commented Aug 30, 2017

Hi team,

thank a lot for this commit. When will this commit added to a terraform release ?

@Freyert
Copy link

Freyert commented Sep 4, 2017

@Xat59 it looks like hashicorp/terraform-provider-vsphere#103 and hashicorp/terraform-provider-vsphere#129 (which supersedes hashicorp/terraform-provider-vsphere#103) may take care of some of the issues?

Whatever the case they closed hashicorp/terraform-provider-vsphere#103, but hashicorp/terraform-provider-vsphere#129 has landed in master.

If you want you can probably pull it down and compile it yourself to play around with if you want.

@ghost
Copy link

ghost commented Apr 7, 2020

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when acting upon powered off VM
4 participants