Closed calloes closed 1 year ago
Hi,
we ran into the same issue and the issue is fixed with #56 . It was merged to master, but since then no new release was created.
@lord-kyron @pavel-z1 Do you have any plans on when to push a new release ?
@steffencircle Here you are: https://github.com/lord-kyron/terraform-provider-phpipam/releases/tag/v1.3.8
Hi,
Currently implementing multiple sections for different environments.
When using either phpipam_first_free_address or phpipam_first_free_subnet and the same address or subnet exists in another section then we see errors such ,
[0m[1mphpipam_first_free_address.ipam_address: Creating...[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mYour search returned zero or multiple results. Please correct your search and try again[0m [31m│[0m [0m [31m│[0m [0m[0m with phpipam_first_free_address.ipam_address, [31m│[0m [0m on module_rcc_core.tf line 91, in resource "phpipam_first_free_address" "ipam_address": [31m│[0m [0m 91: resource "phpipam_first_free_address" "ipam_address" [4m{[0m[0m [31m│[0m [0m [31m╵[0m[0m
Noting terraform actually creates the resource but never complets and add's it into state.
If we delete the duplicate record in the other section the transaction completes fine. Checking the code i see its's doing a call in the resource_phpipam_first_free_address.go addrs, err := c.GetAddressesByIP(out) which understandably returns all the addresses, i think this needs to be done by the subnet reference so it doesn't pull back duplicates in other sections.
Any help greatly appreciated.