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

U height for device type not set to 0, defaults in 1 #625

Open
leijonatm opened this issue Aug 8, 2024 · 5 comments
Open

U height for device type not set to 0, defaults in 1 #625

leijonatm opened this issue Aug 8, 2024 · 5 comments

Comments

@leijonatm
Copy link

Issue Reporting Guide

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform
issue tracker reserved for bug reports and feature requests. For general usage
questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v1.6.6
on darwin_arm64

Affected Resource(s)

Please list the resources as a list, for example:

  • netbox_device_type

Terraform Configuration Files

    RUTX50 = {
        model        = "RUTX50"
        u_height     = 0.0
        manufacturer = "Teltonika"
        # part_number  = ""
    }

Debug Output

Since it is only four lines I post here
[WARN] Provider "provider[\"registry.terraform.io/e-breuninger/netbox\"]" produced an unexpected new value for netbox_device_type.device_type["cpe-pro"], but we are tolerating it because it is using the legacy plugin SDK. The following problems may be the cause of any confusing errors from downstream operations: - .u_height: was cty.NumberIntVal(0), but now cty.NumberIntVal(1)

Panic Output

no panic output. code is accepted as is

Expected Behavior

U height should be updated to 0

Actual Behavior

U height gets set to 1

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

N/A

@leijonatm
Copy link
Author

Has anyone the same issues or is it just me ?

@e-breuninger e-breuninger deleted a comment from zwaq Dec 2, 2024
@fbreckle
Copy link
Collaborator

fbreckle commented Dec 2, 2024

This is probably legit. It happens, because the go json marshaller will remove the "empty" value for each type. This is usually reflected in the fact that you then cannot set bools to false, strings to empty strings, integers to 0 and probably also floats to 0.0.
This takes a small fix to go-netbox to solve, by removing the omitempty from the marshalling annotation.

@leijonatm
Copy link
Author

Is this something that I need to do?

@fbreckle
Copy link
Collaborator

Generally, you COULD do it yourself, but it will probably take way longer than if I do it (it will take like 30 seconds for me).

Your main problem is that I have other things to tend to, in particular keeping up with the breaking changes that the netbox team introduces with each minor version. As netbox 4.2 was recently released (again, with breaking changes, see #675 ), that will be the next priority task.

tl;dr: just wait

@leijonatm
Copy link
Author

Thank you @fbreckle :-) I'll wait

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

No branches or pull requests

2 participants