Constellix / terraform-provider-constellix

Terraform Constellix provider
https://www.terraform.io/docs/providers/constellix/
Mozilla Public License 2.0
7 stars 21 forks source link

Plugin panic on apply: "panic: interface conversion: interface {} is nil, not []interface {}" #42

Closed MahmoudDolah closed 2 years ago

MahmoudDolah commented 2 years ago

While using the plugin, we've run into an issue during an apply which said it's a problem with the plugin

Stack trace:

Stack trace from the terraform-provider-constellix_v0.3.11 plugin:

panic: interface conversion: interface {} is nil, not []interface {}

goroutine 97 [running]:
github.com/Constellix/constellix-go-client/client.checkForErrors(0xc0003cc000, 0x1, 0x1)
    github.com/Constellix/constellix-go-client@v1.0.26/client/client.go:197 +0x435
github.com/Constellix/constellix-go-client/client.(*Client).Save(0xc000186280, 0x1c271c0, 0xc0004fa0b0, 0xc0007cc280, 0x1f, 0x1c5c1b6, 0x1, 0xc0001900d8)
    github.com/Constellix/constellix-go-client@v1.0.26/client/client.go:180 +0x396
github.com/terraform-providers/terraform-provider-constellix/constellix.resourceConstellixCNameRecordCreate(0xc0002a67e0, 0x1bb1fa0, 0xc000186280, 0x2, 0x2615500)
    github.com/terraform-providers/terraform-provider-constellix/constellix/resource_constellix_cname_record.go:343 +0xd0a
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc0004d7050, 0xc0005323c0, 0xc0002745a0, 0x1bb1fa0, 0xc000186280, 0x1b14c01, 0xc000110ee8, 0xc000325a10)
    github.com/hashicorp/terraform-plugin-sdk@v1.15.0/helper/schema/resource.go:310 +0x365
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc0002aa000, 0xc00024fa10, 0xc0005323c0, 0xc0002745a0, 0xc000204bc8, 0xc00081e050, 0x1b16860)
    github.com/hashicorp/terraform-plugin-sdk@v1.15.0/helper/schema/provider.go:294 +0x99
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc00000e008, 0x1ebb960, 0xc000324330, 0xc0002a6000, 0xc00000e008, 0xc000324330, 0xc00020db78)
    github.com/hashicorp/terraform-plugin-sdk@v1.15.0/internal/helper/plugin/grpc_provider.go:885 +0x8b4
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x1c22540, 0xc00000e008, 0x1ebb960, 0xc000324330, 0xc00080c6c0, 0x0, 0x1ebb960, 0xc000324330, 0xc0003dc2c0, 0x284)
    github.com/hashicorp/terraform-plugin-sdk@v1.15.0/internal/tfplugin5/tfplugin5.pb.go:3305 +0x217
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000702900, 0x1ec5ce0, 0xc000703980, 0xc0003c6000, 0xc0006d5470, 0x25db5a0, 0x0, 0x0, 0x0)
    google.golang.org/grpc@v1.27.1/server.go:1024 +0x501
google.golang.org/grpc.(*Server).handleStream(0xc000702900, 0x1ec5ce0, 0xc000703980, 0xc0003c6000, 0x0)
    google.golang.org/grpc@v1.27.1/server.go:1313 +0xd3d
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00003a5e0, 0xc000702900, 0x1ec5ce0, 0xc000703980, 0xc0003c6000)
    google.golang.org/grpc@v1.27.1/server.go:722 +0xa1
created by google.golang.org/grpc.(*Server).serveStreams.func1
    google.golang.org/grpc@v1.27.1/server.go:720 +0xa1

Error: The terraform-provider-constellix_v0.3.11 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.

Full output from terraform apply: https://gist.github.com/MahmoudDolah/d3950b93cb07e778ba3cebf97c89595a