terraform-provider-civo icon indicating copy to clipboard operation
terraform-provider-civo copied to clipboard

interface {} is nil error when scaling default node pool in kubernetes cluster

Open Confuzed opened this issue 2 years ago • 9 comments

I'm using terraform with your provider to manage a cluster, and have encountered an error during the apply stage whenever I try to change the number of nodes in the cluster's default node pool. Note that the configuration change does occur, but terraform doesn't recognise that and thinks the apply failed due to the error.

Output from terraform:

2022-05-05T17:04:30.938Z [ERROR] vertex "civo_kubernetes_cluster.my-cluster" error: Plugin did not respond

Stack trace from the terraform-provider-civo_v1.0.18 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 30 [running]:
github.com/civo/terraform-provider-civo/civo.waitForKubernetesNodePoolCreate(0xc00020a500, 0xc000282b80, 0x1, 0xc000091a00, 0xc00000a5a0)
	/home/runner/work/terraform-provider-civo/terraform-provider-civo/civo/resource_kubernetes_cluster_nodepool.go:369 +0x989
github.com/civo/terraform-provider-civo/civo.resourceKubernetesClusterUpdate(0x10d4e78, 0xc0005a4060, 0xc000282b80, 0xf31620, 0xc00020a500, 0xc0005a6700, 0x86c90a, 0xc000585080)
	/home/runner/work/terraform-provider-civo/terraform-provider-civo/civo/resource_kubernetes_cluster.go:449 +0x78a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xc0004f6ee0, 0x10d4e08, 0xc000500a00, 0xc000282b80, 0xf31620, 0xc00020a500, 0x0, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:364 +0x17f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0004f6ee0, 0x10d4e08, 0xc000500a00, 0xc0002848c0, 0xc000585080, 0xf31620, 0xc00020a500, 0x0, 0x0, 0x0, ...)
	/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:464 +0x390
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00009d758, 0x10d4e08, 0xc000500a00, 0xc0007e8910, 0xc000500a00, 0xeef480, 0xc0007e7500)
	/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:955 +0x8ef
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ApplyResourceChange(0xc0000c0780, 0x10d4eb0, 0xc000500a00, 0xc000284700, 0xc0000c0780, 0xc000762ba0, 0x46ca47)
	/home/runner/go/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/server/server.go:332 +0xb5
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0xeef480, 0xc0000c0780, 0x10d4eb0, 0xc0007e75c0, 0xc0000712c0, 0x0, 0x10d4eb0, 0xc0007e75c0, 0xc00029a000, 0x1f14)
	/home/runner/go/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:380 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000353dc0, 0x10ddd58, 0xc000001500, 0xc000504700, 0xc0005c4600, 0x15e19c0, 0x0, 0x0, 0x0)
	/home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1194 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc000353dc0, 0x10ddd58, 0xc000001500, 0xc000504700, 0x0)
	/home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1517 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0003701f0, 0xc000353dc0, 0x10ddd58, 0xc000001500, 0xc000504700)
	/home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:859 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:857 +0x1fd

Error: The terraform-provider-civo_v1.0.18 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.

Confuzed avatar May 05 '22 17:05 Confuzed