PaloAltoNetworks / terraform-provider-panos

Terraform Panos provider
https://www.terraform.io/docs/providers/panos/
MIT License
89 stars 73 forks source link

Plugin Crashed while using panos_dhcp_interface_info data source #357

Closed ndsnas closed 2 years ago

ndsnas commented 2 years ago

Describe the bug

While using the panos_dhcp_interface_info to get the info about the dhcp ethernet interface the plugin got crashed.

Expected behavior

When using panos_dhcp_interface_info data source like: data "panos_dhcp_interface_info" "ethernet_1_2" { interface = "ethernet1/2" } it should provide info about the ethernet1/2 interface.

Current behavior

Plugin got crashed with following stack trace:

Stack trace from the terraform-provider-panos_v1.10.3 plugin:

panic: interface conversion: interface {} is pango.Panorama, not pango.Firewall

goroutine 97 [running]: github.com/terraform-providers/terraform-provider-panos/panos.dataSourceDhcpInterfaceInfoRead(0x14000bc6150, 0x105f49b00, 0x14000e5a000, 0x14000bc6150, 0x0) github.com/terraform-providers/terraform-provider-panos/panos/data_source_dhcp_interface_info.go:89 +0x354 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(Resource).ReadDataApply(0x140003223c0, 0x14000142020, 0x105f49b00, 0x14000e5a000, 0x140002fc8d0, 0x14000142001, 0x0) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/helper/schema/resource.go:413 +0x74 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(Provider).ReadDataApply(0x14000210880, 0x14000e75ae0, 0x14000142020, 0x14000142020, 0x0, 0x0) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/helper/schema/provider.go:451 +0x80 github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(GRPCProviderServer).ReadDataSource(0x1400000e328, 0x105f915b0, 0x140007261b0, 0x14000b98100, 0x1400000e328, 0x1052a7c80, 0x105ea4560) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/helper/plugin/grpc_provider.go:1046 +0x37c github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadDataSource_Handler(0x105f045a0, 0x1400000e328, 0x105f915b0, 0x140007261b0, 0x14000129260, 0x0, 0x105f915b0, 0x140007261b0, 0x14000bc2000, 0xfd) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/tfplugin5/tfplugin5.pb.go:3341 +0x1c8 google.golang.org/grpc.(Server).processUnaryRPC(0x140002a4fc0, 0x105f9b0f8, 0x14000103200, 0x14000baa000, 0x1400078c660, 0x1066a19b0, 0x0, 0x0, 0x0) google.golang.org/grpc@v1.32.0/server.go:1194 +0x3e8 google.golang.org/grpc.(Server).handleStream(0x140002a4fc0, 0x105f9b0f8, 0x14000103200, 0x14000baa000, 0x0) google.golang.org/grpc@v1.32.0/server.go:1517 +0xa50 google.golang.org/grpc.(Server).serveStreams.func1.2(0x1400003c6a0, 0x140002a4fc0, 0x105f9b0f8, 0x14000103200, 0x14000baa000) google.golang.org/grpc@v1.32.0/server.go:859 +0x94 created by google.golang.org/grpc.(*Server).serveStreams.func1 google.golang.org/grpc@v1.32.0/server.go:857 +0x1f8

Error: The terraform-provider-panos_v1.10.3 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.

Your Environment

welcome-to-palo-alto-networks[bot] commented 2 years ago

:tada: Thanks for opening your first issue here! Welcome to the community!