Closed smesgas closed 2 years ago
You're attempting to use the ngfw resource against a Panorama. You want panos_panorama_address_group
not panos_address_group
. Some resources have converged to work against both firewall and Panorama but this is not one of them.
I'll update this particular resource to error more gracefully then close this issue.
Describe the bug
while creating panos_address_group receiving The terraform-provider-panos_v1.10.0 plugin crashed!
Expected behavior
create address group that can be referenced on other resources
Current behavior
Stack trace from the terraform-provider-panos_v1.10.0 plugin:
panic: interface conversion: interface {} is pango.Panorama, not pango.Firewall
goroutine 16 [running]: github.com/terraform-providers/terraform-provider-panos/panos.createAddressGroup(0xc000c54930, 0x212e7a0, 0xc00000a1e0, 0x2, 0x2ada660) github.com/terraform-providers/terraform-provider-panos/panos/resource_address_group.go:91 +0x33b github.com/hashicorp/terraform-plugin-sdk/helper/schema.(Resource).Apply(0xc00011bae0, 0xc000c40dc0, 0xc000608600, 0x212e7a0, 0xc00000a1e0, 0x1f9c001, 0xc00089eeb8, 0xc000c3baa0) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/helper/schema/resource.go:320 +0x375 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(Provider).Apply(0xc00011c780, 0xc000d29a38, 0xc000c40dc0, 0xc000608600, 0xc00092b048, 0xc000c3e920, 0x1f9dfc0) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/helper/schema/provider.go:294 +0x99 github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(GRPCProviderServer).ApplyResourceChange(0xc000116c78, 0x23711d0, 0xc000c3ab40, 0xc000c541c0, 0xc000116c78, 0xc000c3ab40, 0xc000a64ba0) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/helper/plugin/grpc_provider.go:895 +0x8a5 github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x20e9340, 0xc000116c78, 0x23711d0, 0xc000c3ab40, 0xc000c4afc0, 0x0, 0x23711d0, 0xc000c3ab40, 0xc000051900, 0x123) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/tfplugin5/tfplugin5.pb.go:3305 +0x214 google.golang.org/grpc.(Server).processUnaryRPC(0xc0003496c0, 0x237a8f8, 0xc000803680, 0xc000296800, 0xc0008acae0, 0x2a99c40, 0x0, 0x0, 0x0) google.golang.org/grpc@v1.32.0/server.go:1194 +0x52b google.golang.org/grpc.(Server).handleStream(0xc0003496c0, 0x237a8f8, 0xc000803680, 0xc000296800, 0x0) google.golang.org/grpc@v1.32.0/server.go:1517 +0xd0c google.golang.org/grpc.(Server).serveStreams.func1.2(0xc000114350, 0xc0003496c0, 0x237a8f8, 0xc000803680, 0xc000296800) google.golang.org/grpc@v1.32.0/server.go:859 +0xab created by google.golang.org/grpc.(*Server).serveStreams.func1 google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd
Error: The terraform-provider-panos_v1.10.0 plugin crashed!
Screenshots
Stack trace from the terraform-provider-panos_v1.10.0 plugin:
panic: interface conversion: interface {} is pango.Panorama, not pango.Firewall
goroutine 16 [running]: github.com/terraform-providers/terraform-provider-panos/panos.createAddressGroup(0xc000c54930, 0x212e7a0, 0xc00000a1e0, 0x2, 0x2ada660) github.com/terraform-providers/terraform-provider-panos/panos/resource_address_group.go:91 +0x33b github.com/hashicorp/terraform-plugin-sdk/helper/schema.(Resource).Apply(0xc00011bae0, 0xc000c40dc0, 0xc000608600, 0x212e7a0, 0xc00000a1e0, 0x1f9c001, 0xc00089eeb8, 0xc000c3baa0) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/helper/schema/resource.go:320 +0x375 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(Provider).Apply(0xc00011c780, 0xc000d29a38, 0xc000c40dc0, 0xc000608600, 0xc00092b048, 0xc000c3e920, 0x1f9dfc0) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/helper/schema/provider.go:294 +0x99 github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(GRPCProviderServer).ApplyResourceChange(0xc000116c78, 0x23711d0, 0xc000c3ab40, 0xc000c541c0, 0xc000116c78, 0xc000c3ab40, 0xc000a64ba0) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/helper/plugin/grpc_provider.go:895 +0x8a5 github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x20e9340, 0xc000116c78, 0x23711d0, 0xc000c3ab40, 0xc000c4afc0, 0x0, 0x23711d0, 0xc000c3ab40, 0xc000051900, 0x123) github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/tfplugin5/tfplugin5.pb.go:3305 +0x214 google.golang.org/grpc.(Server).processUnaryRPC(0xc0003496c0, 0x237a8f8, 0xc000803680, 0xc000296800, 0xc0008acae0, 0x2a99c40, 0x0, 0x0, 0x0) google.golang.org/grpc@v1.32.0/server.go:1194 +0x52b google.golang.org/grpc.(Server).handleStream(0xc0003496c0, 0x237a8f8, 0xc000803680, 0xc000296800, 0x0) google.golang.org/grpc@v1.32.0/server.go:1517 +0xd0c google.golang.org/grpc.(Server).serveStreams.func1.2(0xc000114350, 0xc0003496c0, 0x237a8f8, 0xc000803680, 0xc000296800) google.golang.org/grpc@v1.32.0/server.go:859 +0xab created by google.golang.org/grpc.(*Server).serveStreams.func1 google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd
Error: The terraform-provider-panos_v1.10.0 plugin crashed!