e-breuninger / terraform-provider-netbox

Terraform provider to interact with Netbox
https://registry.terraform.io/providers/e-breuninger/netbox/latest/docs
Mozilla Public License 2.0
173 stars 117 forks source link

data source netbox_ip_addresses throws error with bool type custom_fields #596

Closed pidreher closed 2 months ago

pidreher commented 2 months ago

Hi,

when trying to get ip addresses I get this error: Error: ip_addresses.0.custom_fields.dnserror: '' expected type 'string', got unconvertible type 'bool', value: 'false'

I got at least one custom field with bool type. Seems like either the return from the api needs to be explicitly converted into a map of strings or it needs to accept other data types as well.

https://github.com/e-breuninger/terraform-provider-netbox/blob/704c7fce103b0323574078459d3481410615ebf5/netbox/data_source_netbox_ip_addresses.go#L204

provider version: 3.8.5 netbox version: v3.7.7

pidreher commented 2 months ago

should've searched the issues I guess:

416

409

pidreher commented 2 months ago

closing as duplicate, also I'm dumb and already commented on this last year: https://github.com/e-breuninger/terraform-provider-netbox/pull/443#issuecomment-1719033256

sorry