Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpipam_first_free_subnet: Error: Subnet either missing or multiple results returned by reading subnet after creation #53

Closed
steffencircle opened this issue Dec 21, 2022 · 1 comment · Fixed by #56

Comments

@steffencircle
Copy link
Contributor

Hi,

we are using the latest version of the provider (1.3.6) and are facing a similiar issue as described here #43

In our case it happens for the resource phpipam_first_free_subnet

The error is the same:

Error: Subnet either missing or multiple results returned by reading subnet after creation

We are using PHPIPam to manage secondary IP Ranges for Google Kubernetes Engine clusters.
Each environment is a separate section in PHPIPAM and each one contains the same Parent Subnet Range, where we can dynamically allocate new subnets from.

From a technical perspective its desired to re-use the same IP Ranges in different stages, hence the separate sections.

The creation of the next free subnet seems to work, as i can see it in PHPIPAM, however as with #43 the answer back with the result contains all subnets across all sections that have the very same range.

I tried to provide the section_id parameter to the resource, but that returns the error:

Error: "section_id": this field cannot be set

Happy to provide more details if required.

@steffencircle
Copy link
Contributor Author

I looked into it myself and from my point of view a very easy fix is to add the section_id parameter to the phpipam_first_free_subnet resource.

This is in-line with the phpipam_subnet resource, which also has that parameter set as required.

The fix for creating the same subnet in different section that was added as part of #43 then also works for the phpipam_first_free_subnet resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant