sky-uk / terraform-provider-infoblox

Terraform Infoblox provider
BSD 3-Clause "New" or "Revised" License
15 stars 10 forks source link

Networks turn into networkcontainers when new networks created under them #81

Open jasonmcintosh opened 6 years ago

jasonmcintosh commented 6 years ago

IF you create a "network" and then create networks underneath that network by adding func:nextavailablenetwork:${infoblox_network.mynetwork.network},default,18 to try and create subnet networks, terraform will succeed the first time, but it will fail afterwards.

The reason for this is Infoblox changes the "mynetwork" resource to a "networkcontainer" as soon as you add additional networks under that network. Terraform can no longer find the network it just created due to resource locator looking for network/uuidofsomesort:10.0.0.0/8/default. Infoblox has changed it to "networkcontainer/somenewuuid:10.0.0/8/default"

Some ideas? 1) Change the call to search for "networkcontainer" when it can't find it by network? Most work, but actually solves the problem (in theory) 2) Query first to see if you're creating a resource under a network and fail? Probably not ideal 3) other ideas?

Challenges: When a network gets converted into a network container, it seems to lose all the DHCP/reservations that it previously held. NOT a great situation.

SO this issue is much more an infoblox issue than a terraform or provider issue, but if nothing else, should probably document the above behavior on the wiki.

keithhopkins-gpc commented 6 years ago

That's interesting, as I was trying to determine 'how to create a network container'.

jasonmcintosh commented 6 years ago

Yeah I tried and tried couldn't find a way to do it on network creation to create it as a container - it's automatic on adding networks to an existing network. Which IMHO feels like a bad idea (idempotent - if you create a "network" it should stay a network).

jimrazmus commented 5 years ago

@jasonmcintosh What version of Infoblox and WAPI exhibited this behavior?

jasonmcintosh commented 5 years ago

I'll have to go back try find it but was the latest release of infoblox & WAPI at the time.