infobloxopen/terraform-provider-infoblox

How to import infoblox_ip_allocation when enable_dns is false?

Opened this issue · 2 comments

I have infoblox_ip_allocation resources created with v1 of the provider. When dns is enabled, I set the Terraform Internal ID attribute on the host record and can the import the infoblox_ip_allocation with the v2 provider. However, with enable_dns set to false, there is no host record to add an attribute to, only the IP reservation. If I add the attribute to the IPv4 reservation terraform says it can't find it:

❯ terraform import infoblox_ip_allocation.ip 7be29190-25a6-11ee-b75f-c726b05fba4d
infoblox_ip_allocation.ip: Importing from ID "7be29190-25a6-11ee-b75f-c726b05fba4d"...
╷
│ Error: not found
│ 
│ 

Please fix.

As a workaround I have found that you can manually add a disabled HOST record with a "Terraform Internal ID" extattr to the IP allocation and then delete it afterwards.