You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a device interface is connected, read this interface breaks the provider.
If I create 2 devices with 1 interface each and, if I terraform apply -target=netbox_device_interface.interface1 it works.
If I then connect the interfaces together and if I terraform apply -target=netbox_device_interface.interface1 it breaks the provider.
Versions
Terraform: v1.3.6
Netbox provider: v3.0.13
Affected Resource(s)
netbox_device_interface
Steps to Reproduce
Create 2 devices with 1 interface each.
resource "netbox_manufacturer" "test" {
name = "test"
}
resource "netbox_device_type" "test" {
model = "test"
manufacturer_id = netbox_manufacturer.test.id
}
resource "netbox_site" "test" {
name = "test"
}
resource "netbox_device_role" "test" {
color_hex = "000000"
name = "test"
}
resource "netbox_device" "test1" {
name = "test1"
device_type_id = netbox_device_type.test.id
role_id = netbox_device_role.test.id
site_id = netbox_site.test.id
}
resource "netbox_device_interface" "interface1" {
device_id = netbox_device.test1.id
name = "test"
type = "1000base-t"
}
resource "netbox_device" "test2" {
name = "test2"
device_type_id = netbox_device_type.test.id
role_id = netbox_device_role.test.id
site_id = netbox_site.test.id
}
resource "netbox_device_interface" "interface2" {
device_id = netbox_device.test2.id
name = "test"
type = "1000base-t"
}
Then, force a netbox_device_interface read:
terraform apply -target=modules.netbox_content.netbox_device_interface.interface1
module.netbox_content.netbox_device_role.test: Refreshing state... [id=16]
module.netbox_content.netbox_site.test: Refreshing state... [id=10]
module.netbox_content.netbox_manufacturer.test: Refreshing state... [id=25]
module.netbox_content.netbox_device_type.test: Refreshing state... [id=117]
module.netbox_content.netbox_device.test1: Refreshing state... [id=1855]
module.netbox_content.netbox_device_interface.interface1: Refreshing state... [id=32347]
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
╷
│ Warning: Resource targeting is in effect
│
│ You are creating a plan with the -target option, which means that the result of this plan may not represent all of the changes requested by the current configuration.
│
│ The -target option is not for routine use, and is provided only for exceptional situations such as recovering from errors or mistakes, or when Terraform specifically suggests to use it as part of an
│ error message.
╵
╷
│ Warning: Applied changes may be incomplete
│
│ The plan was created with the -target option in effect, so some changes requested in the configuration may have been ignored and the output values may not be fully updated. Run the following command
│ to verify that no other changes are pending:
│ terraform plan
│
│ Note that the -target option is not suitable for routine use, and is provided only for exceptional situations such as recovering from errors or mistakes, or when Terraform specifically suggests to use
│ it as part of an error message.
╵
Releasing state lock. This may take a few moments...
Then, if I connect those interfaces together.
and I read back the device interface:
terraform apply -target=module.netbox_content.netbox_device_interface.interface1
module.netbox_content.netbox_manufacturer.test: Refreshing state... [id=25]
module.netbox_content.netbox_site.test: Refreshing state... [id=10]
module.netbox_content.netbox_device_role.test: Refreshing state... [id=16]
module.netbox_content.netbox_device_type.test: Refreshing state... [id=117]
module.netbox_content.netbox_device.test1: Refreshing state... [id=1855]
module.netbox_content.netbox_device_interface.interface1: Refreshing state... [id=32347]
╷
│ Warning: Resource targeting is in effect
│
│ You are creating a plan with the -target option, which means that the result of this plan may not represent all of the changes requested by the current configuration.
│
│ The -target option is not for routine use, and is provided only for exceptional situations such as recovering from errors or mistakes, or when Terraform specifically suggests to use it as part of an
│ error message.
╵
╷
│ Error: Plugin did not respond
│
│ with module.netbox_content.netbox_device_interface.interface1,
│ on .terraform/modules/netbox_content/bug.tf line 26, in resource "netbox_device_interface" "interface1":
│ 26: resource "netbox_device_interface" "interface1" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵
Stack trace from the terraform-provider-netbox_v3.0.13 plugin:
panic: interface conversion: error is *json.UnmarshalTypeError, not *dcim.DcimInterfacesReadDefault
goroutine 95 [running]:
github.com/e-breuninger/terraform-provider-netbox/netbox.resourceNetboxDeviceInterfaceRead({0x1b5c7e0?, 0xc00035fda0?}, 0xc000675500, {0x164eea0?, 0xc0004d72c0})
github.com/e-breuninger/terraform-provider-netbox/netbox/resource_netbox_device_interface.go:150 +0x3ec
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc00010f0a0, {0x1b5c7e0, 0xc00035fda0}, 0xd?, {0x164eea0, 0xc0004d72c0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/resource.go:724 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc00010f0a0, {0x1b5c7e0, 0xc00035fda0}, 0xc000435380, {0x164eea0, 0xc0004d72c0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/resource.go:1015 +0x585
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000185848, {0x1b5c7e0?, 0xc00035fc80?}, 0xc00041fc80)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.1/helper/schema/grpc_provider.go:613 +0x4a5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc000238820, {0x1b5c7e0?, 0xc00035f6b0?}, 0xc00066ce40)
github.com/hashicorp/terraform-plugin-go@v0.14.2/tfprotov5/tf5server/server.go:748 +0x4b1
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x188b5a0?, 0xc000238820}, {0x1b5c7e0, 0xc00035f6b0}, 0xc000127c00, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.14.2/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000210000, {0x1b60580, 0xc0002931e0}, 0xc000391e60, 0xc0002906c0, 0x2a2eaf0, 0x0)
google.golang.org/grpc@v1.51.0/server.go:1340 +0xd23
google.golang.org/grpc.(*Server).handleStream(0xc000210000, {0x1b60580, 0xc0002931e0}, 0xc000391e60, 0x0)
google.golang.org/grpc@v1.51.0/server.go:1713 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/grpc@v1.51.0/server.go:965 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.51.0/server.go:963 +0x28a
Error: The terraform-provider-netbox_v3.0.13 plugin crashed!
This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
... it breaks the plugin.
The text was updated successfully, but these errors were encountered:
Hello,
When a device interface is connected, read this interface breaks the provider.
If I create 2 devices with 1 interface each and, if I
terraform apply -target=netbox_device_interface.interface1
it works.If I then connect the interfaces together and if I
terraform apply -target=netbox_device_interface.interface1
it breaks the provider.Versions
Affected Resource(s)
Steps to Reproduce
Create 2 devices with 1 interface each.
Then, force a
netbox_device_interface
read:Then, if I connect those interfaces together.
and I read back the device interface:
... it breaks the plugin.
The text was updated successfully, but these errors were encountered: