Closed sarah-blazic closed 2 years ago
Trying to create a PBF rule with a target firewall, results in errors.
I expect it to create a PBF rule with a target firewall when I provide the serial number.
Resource is not created and throws the terraform-provider-panos_v1.8.3 exe plugin crashed! error.
resource "panos_panorama_pbf_rule_group" "this" { rule { name = "target" destination { addresses = ["any"] applications = ["any"] services = ["application-default"] } forwarding {} source { addresses = ["any"] users = ["any"] } target { serial = "0123456789" } } }
Run terraform plan
terraform plan
Stack trace from the terraform-provider-panos_v1.8.3.exe plugin: panic: interface conversion: interface {} is *schema.Set, not []interface {} goroutine 24 [running]: github.com/terraform-providers/terraform-provider-panos/panos.resourceTargetHash(0x104b500, 0xc0003a9c20, 0x11f7230) github.com/terraform-providers/terraform-provider-panos/panos/hashes.go:21 +0x25f github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Set).hash(0xc0006698c0, 0x104b500, 0xc0003a9c20, 0x3, 0xc00000dcc0) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/set.go:221 +0x44 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Set).add(0xc0006698c0, 0x104b500, 0xc0003a9c20, 0xc00000de00, 0x0, 0xc00049d000) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/set.go:198 +0x8b github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ConfigFieldReader).readSet(0xc0003a8de0, 0xc0003a9bc0, 0x3, 0x3, 0xc00000de00, 0x0, 0x0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/field_reader_config.go:309 +0x388 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ConfigFieldReader).readField(0xc0003a8de0, 0xc0003a9bc0, 0x3, 0x3, 0xffe901, 0x0, 0x0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/field_reader_config.go:132 +0xb06 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*nestedConfigFieldReader).ReadField(0xc00020e7e0, 0xc0003a9bc0, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/field_reader_config.go:352 +0xa8 github.com/hashicorp/terraform-plugin-sdk/helper/schema.readObjectField(0x13567e0, 0xc00020e7e0, 0xc000669680, 0x2, 0x2, 0xc000207b60, 0x0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/field_reader.go:244 +0x21a github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ConfigFieldReader).readField(0xc0003a8de0, 0xc000669680, 0x2, 0x2, 0x102dc01, 0x0, 0x0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/field_reader_config.go:134 +0x9f7 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*nestedConfigFieldReader).ReadField(0xc00020e7d0, 0xc000669680, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/field_reader_config.go:352 +0xa8 github.com/hashicorp/terraform-plugin-sdk/helper/schema.readListField(0x13567e0, 0xc00020e7d0, 0xc0003d5750, 0x1, 0x1, 0xc00000d680, 0x0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/field_reader.go:211 +0x37f github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ConfigFieldReader).readField(0xc0003a8de0, 0xc0003d5750, 0x1, 0x1, 0xacd900, 0x0, 0x0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/field_reader_config.go:128 +0x69e github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ConfigFieldReader).ReadField(0xc0003a8de0, 0xc0003d5750, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x101eb40, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/field_reader_config.go:28 +0xd3 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*MultiLevelFieldReader).ReadFieldExact(0xc000669640, 0xc0003d5750, 0x1, 0x1, 0x11a4a8b, 0x6, 0x0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/field_reader_multi.go:31 +0xf6 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ResourceData).get(0xc00057a310, 0xc0003d5750, 0x1, 0x1, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/resource_data.go:534 +0x129 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ResourceData).getChange(0xc00057a310, 0x11a319f, 0x4, 0x1201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/resource_data.go:510 +0x12a github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ResourceData).diffChange(0xc00057a310, 0x11a319f, 0x4, 0x0, 0xc000272ec0, 0xafd13f, 0x4, 0xffe920) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/resource_data.go:487 +0xa6 github.com/hashicorp/terraform-plugin-sdk/helper/schema.schemaMap.diffList(0xc000207b30, 0x11a319f, 0x4, 0xc00000d680, 0xc0003b9390, 0x13733e8, 0xc00057a310, 0x1336900, 0x0, 0x0) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/schema.go:958 +0x75 github.com/hashicorp/terraform-plugin-sdk/helper/schema.schemaMap.diff(0xc000207b30, 0x11a319f, 0x4, 0xc00000d680, 0xc000669600, 0x13733e8, 0xc00057a310, 0xffe900, 0x0, 0x0) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/schema.go:919 +0x473 github.com/hashicorp/terraform-plugin-sdk/helper/schema.schemaMap.Diff(0xc000207b30, 0xc00071f5e0, 0xc0003a86f0, 0x0, 0x1199aa0, 0xc000184540, 0xc00049cb00, 0x0, 0xffe920, 0xffe920) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/schema.go:500 +0x239 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).simpleDiff(0xc000097380, 0xc00071f5e0, 0xc0003a86f0, 0x1199aa0, 0xc000184540, 0xc0003a8601, 0xc000273740, 0x2df554) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/resource.go:351 +0x8c github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).SimpleDiff(0xc0001fbb80, 0xc000273948, 0xc00071f5e0, 0xc0003a86f0, 0xc0003a5de0, 0xc0003a86f0, 0x0) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/helper/schema/provider.go:321 +0xa5 github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).PlanResourceChange(0xc00020e308, 0x136f1f0, 0xc000390600, 0xc000087980, 0xc00020e308, 0xc000390600, 0xc000829a50) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/internal/helper/plugin/grpc_provider.go:633 +0x765 github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_PlanResourceChange_Handler(0x1162d40, 0xc00020e308, 0x136f1f0, 0xc000390600, 0xc000087920, 0x0, 0x136f1f0, 0xc000390600, 0xc00014f000, 0x3d0) github.com/hashicorp/terraform-plugin-sdk@v1.4.0/internal/tfplugin5/tfplugin5.pb.go:3171 +0x222 google.golang.org/grpc.(*Server).processUnaryRPC(0xc000146160, 0x1377538, 0xc000084600, 0xc000752200, 0xc0005cc690, 0x197bb48, 0x0, 0x0, 0x0) google.golang.org/grpc@v1.23.0/server.go:995 +0x482 google.golang.org/grpc.(*Server).handleStream(0xc000146160, 0x1377538, 0xc000084600, 0xc000752200, 0x0) google.golang.org/grpc@v1.23.0/server.go:1275 +0xd4c google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00008a210, 0xc000146160, 0x1377538, 0xc000084600, 0xc000752200) google.golang.org/grpc@v1.23.0/server.go:710 +0xb2 created by google.golang.org/grpc.(*Server).serveStreams.func1 google.golang.org/grpc@v1.23.0/server.go:708 +0xa8 Error: The terraform-provider-panos_v1.8.3.exe 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.
Terraform v0.15.3 on windows_amd64 + provider registry.terraform.io/paloaltonetworks/panos v1.8.3
Describe the bug
Trying to create a PBF rule with a target firewall, results in errors.
Expected behavior
I expect it to create a PBF rule with a target firewall when I provide the serial number.
Current behavior
Resource is not created and throws the terraform-provider-panos_v1.8.3 exe plugin crashed! error.
Steps to reproduce
Run
terraform plan
Your Environment