vatesfr / terraform-provider-xenorchestra

Xen Orchestra provider for Terraform
MIT License
150 stars 33 forks source link

`high_availability` and `auto_poweron` settings don't seem to apply on create #209

Closed 4censord closed 11 months ago

4censord commented 1 year ago

Using this Terraform config

resource "xenorchestra_vm" "vm" {
  name_label = "${local.projekt}"
  template   = data.xenorchestra_template.template.id

  cpus       = 1
  memory_max = 1 * local.gib

  auto_poweron      = true
  high_availability = "restart"

  wait_for_ip = true

  cdrom {
    id = data.xenorchestra_vdi.iso.id
  }

  network {
    network_id = data.xenorchestra_network.network.id
  }

  disk {
    sr_id      = data.xenorchestra_sr.storage.id
    name_label = "Data disk for ${local.projekt}"
    size       = 1 * local.gib
  }

  tags = [
    "dev",
  ]
}

Terraform confirms that they are disabled but should be enabled

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:

  # xenorchestra_vm.vm will be updated in-place
  ~ resource "xenorchestra_vm" "vm" {
      ~ auto_poweron       = false -> true
      + high_availability  = "restart"
        id                 = "0fb977c1-a761-4b6e-74c5-1ae1c08f8bfc"
        tags               = [
            "dev",
        ]
        # (17 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

ddelnano commented 11 months ago

The fix will be available in the next release (whatever comes after v0.24.1 -- specific version number to be decided).