smutel/terraform-provider-netbox

Data netbox_ipam_vlan_group triggers JSON error

Closed this issue · 2 comments

Summary

data netbox_ipam_vlan_group triggers Error: json: cannot unmarshal object into Go struct field VLANGroup.results.scope of type string

Version

4.0.0

Netbox version

v3.1.11

Terraform version

Terraform v1.2.2
on darwin_amd64
+ provider registry.terraform.io/smutel/netbox v4.0.0

Provider version

4.0.0 on darwin/amd64

Issue details

Affected Data(s) / Resource(s)

  • data netbox_ipam_vlan_group

Terraform Configuration Files

terraform {
  required_providers {
    netbox = {
      source  = "smutel/netbox"
      version = ">= 4.0.0"
    }
  }
}

provider "netbox" {
  url   = var.netbox_url
  token = var.netbox_token
}

data "netbox_ipam_vlan_group" "test" {
  slug = "myVlanGroupName"
}

Terraform Output

│ Error: json: cannot unmarshal object into Go struct field VLANGroup.results.scope of type string
│ 
│   with data.netbox_ipam_vlan_group.test,
│   on main.tf line 15, in data "netbox_ipam_vlan_group" "test":
│   15: data "netbox_ipam_vlan_group" "test" {
│ 

Behaviors

Actual Behavior

JSON error

Expected Behavior

Data properly acquired and stored in state

Steps to Reproduce

  1. Create a vlan group with scope
  2. Try to get data on this vlan group

Debug log

Hi @smutel : Thanks a lot for the quick reaction on this. Do you plan to release an updated package any time soon? Working with non-published versions in Terraform is painful.

I am working to generate the docs automatically for this provider. I would like to integrate this to the release. I will try to create it next week.