-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Terraform import of unifi_device returning error #136
Comments
This may be a bug that was recently fixed in the SDK, hopefully will ship a new version shortly that fixes some of these marshalling issues. Are you on the latest version of the provider? |
Hey Paul, Yes I am on 0.26.0. May I ask though... how do you find the API info and debug requests to the API at current? Do you use mitmproxy or something similar? I am interested in helping to do some development on this provider (and also contemplating working on a Terraform provider of my own) so any advice on how to get started would be appreciated. Thanks, Alan Jenkins |
Confirmed this on 0.26.0 w/ UDM Pro Firmware 1.8.6 and Network 6.0.43. |
I am seeing a similar issue, just with ❯ terraform import unifi_device.love-loft 74:ac:b9:a8:d6:96
unifi_device.love-loft: Importing from ID "74:ac:b9:a8:d6:96"...
│ Error: unable to decode body: GET s/default/stat/device unable to unmarshal alias: json: cannot unmarshal number into Go struct field .stp_priority of type string |
I'm seeing the same issue as @kradalby, when planning: │ Error: unable to decode body: GET s/default/stat/device unable to unmarshal alias: json: cannot unmarshal number into Go struct field .stp_priority of type string
│
│ with unifi_device.kjokken,
│ on aps.tf line 15, in resource "unifi_device" "kjokken":
│ 15: resource "unifi_device" "kjokken" { I've enabled STP under Networks in the GUI, and overridden the manual configuration for a switch. Reverting the change gives the same behaviour. Should it be changed to |
@evenh I think you are correct, when I just inspected my traffic i saw |
I'll do a quick update and regenerate the SDK and bump the version. |
This fix should go out in v0.38.2, I'm not 100% sure it will fix this, but worth a shot! |
If it doesn't fix it, just let me know here and I'll reopen it |
Confirming this had been an issue and is now fixed in v0.38.2 w/ UDM Pro Firmware 1.12.30 and Network 7.2.94/7.2.95. Thank you! |
When importing a unifi_device I am receiving the following error:
Do you have any advice on how to debug the response as this was previously working so I am wondering if this is due to an update of the Unifi Dream Machine's Network Management module.
The text was updated successfully, but these errors were encountered: