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

opennebula_host is imported with type: null #455

Closed al-lac closed 1 year ago

al-lac commented 1 year ago

Description

When importing an opennebula_host, it is imported without the type set.

Terraform and Provider version

Terraform v1.4.6 on darwin_arm64

Affected resources and data sources

opennebula_host

Terraform configuration

resource "opennebula_host" "example" {
  name       = "test
  type       = "kvm"
  cluster_id = 101

  tags = {
    labels = "test"
  }
}

Expected behavior

When importing an opennebula_host, the type should be set to kvm or whatever the type is.

Actual behavior

The opennebula_host is imported with type: null which would destroy the existing host upon apply.

Steps to Reproduce

terraform import 'opennebula_host.example' 101

terraform apply -target 'opennebula_host.example'

Debug output

No response

Panic output

No response

Important factoids

No response

References

No response