smutel / terraform-provider-netbox

Terraform provider for Netbox
ISC License
58 stars 19 forks source link

chore(release): 5.3.0 #168

Closed smutel closed 1 year ago

smutel commented 1 year ago

Hello @amhn,

I am not able to create a new release because of this issue on 386 arch:

   ⨯ release failed after 17m51s              error=failed to build for freebsd_386: exit status 2: # github.com/smutel/terraform-provider-netbox/v4/netbox/ipam
Error: netbox/ipam/resource_netbox_ipam_asn.go:35:44: cannot use 4294967295 (untyped int constant) as int value in argument to validation.IntBetween (overflows)

The easiest way is to not compile this provider for 386 architecture but if you have an idea to change the code and to keep them, it's welcome.

amhn commented 1 year ago

Does changing the line to

ValidateFunc: validation.IntAtLeast(1)

help?

It's not ideal. But it seems this is a problem in terraform-plugin-sdk which only suports the int datatype. This Datatype is dependent on the architecture. On 32bit systems 4294967295 is UINT_MAX, while int only support INT_MAX which is UINT_MAX/2.