-
Notifications
You must be signed in to change notification settings - Fork 30
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
showVLAN showVRF and showSupernetOnly became int in phpIPAM version 1.6.0 #93
Comments
I'm also having this issue.
Looks like we're waiting for a release to include this change phpipam/phpipam#4043 (comment) which should fix this issue @pavel-z1 ? |
Same issue here
|
Have a solution for this problem? |
I think the problem is not in the terraform provider but in the database phpipam conversion script when installing version 1.6.0. In tinyint type fields, instead of having the value 0, there is now the value \u0000 which causes a problem for the terraform requests. The solution is to delete the entry in phpipam and recreate the entry with terraform (terraform put the value 0 back into fields) or simply make a modification to the entry in phpipam to reset the value to 0 in the tinyint type fields. |
@pavel-z1 FYI |
I reproduced this issue. It is not related specifically to 1.6.0, but rather to php8 support (that is included with 1.6.0). If you run 1.6.0 with php7, there is no issue. With php8+, the ints in the json response of the API are encoded as json ints, instead of string before. sdiff -s php8.json php7.json
"id": 3, | "id": "3",
"masterSection": 0, | "masterSection": "0",
"showSubnet": 1, | "showSubnet": "1",
"showVLAN": 0, | "showVLAN": "0",
"showVRF": 0, | "showVRF": "0",
"showSupernetOnly": 0, | "showSupernetOnly": "0" I guess the provider is expecting ints encoded as string ("showVLAN": "0"), like before with php7, instead of int: ( "showVLAN": 0), that causes the unmarshal error : Error: JSON parsing error: json: cannot unmarshal number into Go struct field Section.showVLAN of type string - |
Hi @chavan-dinesh @d-costa @CapMousse @lucasdk3 @Marquis79 This issue was discussed previously here #84 Back compatibility was added:
Now, to make it all work, the PHPIPAM team needs to release a new version with this fix. We have been expecting this action from the PHPIPAM team since May. Till the new release of PHPIPAM will be created you can use workaround for PHPIPAM 1.6.0 discribed here #84 (comment) |
showVLAN showVRF and showSupernetOnly became int in phpIPAM version 1.6.0 causing provider to fail
Previous versions of phpIPAM were returning BoolIntString but latest version not doing so!
Same output from phpIPAM 1.4.5:
As you can see API call from 1.4.5 version returning showVLAN , showVRF and showSupernetOnly as BoolIntString.
Not sure who should fix it either you from provider side or phpIPAM from API side :)
But terraform provider is breaking due to this.
The text was updated successfully, but these errors were encountered: