infobloxopen / terraform-provider-infoblox

Infoblox NIOS Terraform Provider
https://github.com/infobloxopen/terraform-provider-infoblox
Mozilla Public License 2.0
67 stars 73 forks source link

How to import infoblox_ip_allocation when enable_dns is false? #313

Open grimm26 opened 1 year ago

grimm26 commented 1 year ago

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
│ 
│ 
patfreeman commented 7 months ago

Please fix.

grimm26 commented 7 months ago

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.