OpenNebula / terraform-provider-opennebula

Terraform provider for OpenNebula
https://www.terraform.io/docs/providers/opennebula/
Mozilla Public License 2.0
63 stars 52 forks source link

Can't destroy (or refresh) failed host #425

Closed mikisvaz closed 1 year ago

mikisvaz commented 1 year ago

Community Note

Terraform Version

1.4.2

Affected Resource(s)

Terraform Configuration Files

terraform {
  required_providers {
    opennebula = {
    source = "OpenNebula/opennebula"
    version = "1.2.0"
    }
  }
}
provider "opennebula" {
  endpoint = "http://lab-69-node1.opennebula.cloud:2633/RPC2"
  username = "USER"
  password = "PASS"
}
resource "opennebula_host" "this" {
  name       = "TEST"
  type       = "kvm"
  cluster_id = 0
  tags = {
    deployment_id = "some id"
  }
}

Debug Output

https://gist.github.com/mikisvaz/47ae9b3d9bb93412ff286d1047bc1cc1

Panic Output

Expected Behavior

It should have removed the failed host

Actual Behavior

It fails to destroy the resource, instead it fails stating that:

Template GetPair: key DEPLOYMENT_ID not found

Steps to Reproduce

  1. terraform apply
  2. terraform destroy

Important Factoids

References