Closed sor88 closed 1 year ago
When importing the resource, it seems the reservation_vnet
attributes doesn't take it's default value -1
, but give 0
instead which is a valid virtual network ID.
As a consequence, the reading code of the vnet try to read it as if it was a reservation vnet and then try to parse the parent network ID (but network 0 has no parent ID so the field is empty).
I'll need to add a check in the reading code of the virtual network to truly detect if the current vnet is a reservation (like testing what's inside the parent network ID attribute before trying to parse it)
resource "opennebula_virtual_network" "network28" { name = data.opennebula_virtual_network.example.name reservation_vnet = 28 reservation_size = 5 }
opennebula_virtual_network.network28: Importing from ID "28"... opennebula_virtual_network.network28: Import prepared! Prepared opennebula_virtual_network for import opennebula_virtual_network.network28: Refreshing state... [id=28] ╷ │ Error: Failed to parse parent network ID │ │ virtual network (ID: 28): strconv.ParseInt: parsing "": invalid syntax ╵
how did the opennebula provider update come about?
Hello,
The v1.2.1
is in RC stage and will be released in the next business days.
For now, you can pull tag v1.2.1-rc2
and follow the CONTRIBUTING guide to test it.
Please let me know if you need assistance with that.
ok. Thank's.
Awesome! Everything is working! waiting for the release!!!
terraform resource
This my resource for import in tfstate. It created manually with web ui opennebula.
Terraform Version
Panic Output