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

power_state: this field cannot be set #172

Open
mritzmann opened this issue Oct 26, 2020 · 0 comments
Open

power_state: this field cannot be set #172

mritzmann opened this issue Oct 26, 2020 · 0 comments

Comments

@mritzmann
Copy link
Contributor

mritzmann commented Oct 26, 2020

Nutanix Cluster Information

  • Nutanix Cluster (Prism Element / AOS): 5.10.10.1 LTS
  • Nutanix Prism Central: 5.16.1.3

Terraform Version

$ terraform -v
Terraform v0.13.5
+ provider registry.terraform.io/-/nutanix v1.1.0
+ provider registry.terraform.io/terraform-providers/nutanix v1.1.0

Affected Resource(s)

  • nutanix_virtual_machine

Terraform Configuration Files

resource "nutanix_virtual_machine" "tf-69373009-9823-8102-24d5-983ee575ec85" {
  name = "server01.example.com"
  cluster_uuid = "00056dce***"
  memory_size_mib = "2048"
  num_sockets = "1"
  power_state = "OFF"
  use_hot_add = false
  guest_customization_cloud_init_user_data = "[snip]"
  nic_list {
    subnet_uuid = "246285c9-d1e3-4050-ba0d-5b2be8713681"
  }
  disk_list {
    data_source_reference = {
      kind = "image"
      uuid = "79e63e65-cf7d-4b4e-96a2-68378df369ee"
    }
  }
  lifecycle {
    prevent_destroy = true
    ignore_changes = [
      nic_list,
      disk_list,
      guest_customization_cloud_init_user_data,
    ]
  }
}

Debug Output

https://gist.github.com/mritzmann/be89f883bd71d3a06877e55c821b51a0

Panic Output

There is no panic output.

Expected Behavior

The running VM should be shut down.

Actual Behavior

$ terraform plan -lock=false -target nutanix_virtual_machine.tf-69373009-9823-8102-24d5-983ee575ec85

Error: "power_state": this field cannot be set

  on QS7yQkgYpJKtLeERd-server01.example.com.tf line 1, in resource "nutanix_virtual_machine" "tf-69373009-9823-8102-24d5-983ee575ec85":
   1: resource "nutanix_virtual_machine" "tf-69373009-9823-8102-24d5-983ee575ec85" {

Steps to Reproduce

  1. Create a new Server that match my provided template (but without power_state)
  2. Add power_state and run terraform plan -target nutanix_virtual_machine.tf-69373009-9823-8102-24d5-983ee575ec85

Important Factors

We mange several hundreds vms with terraform, so i redacted some information in the debug output.

References

Similar Issues, but closed:

@mritzmann mritzmann changed the title power_state: Syntax Error power_state: this field cannot be set Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant