Error: The terraform-provider-digitalocean_v2.31.0 plugin crashed! #1070
Replies: 2 comments 1 reply
-
Hi @gimeroni-lms, We recently merged a pull request that should prevent this panic. It will be part of our next release. The bug on the Terraform provider side fixed by that PR is that we are not properly handling the error response from the API. Without debug logs, it is hard to determine exactly what API error you are encountering. One possibility is that you are receiving a 403 response due to using a read-only API token. Recently the DOKS API made a change to require a read-write token when accessing the https://docs.digitalocean.com/release-notes/kubernetes/#2023-10-17 So replacing the read-only token with a read-write token may resolve this problem for you. |
Beta Was this translation helpful? Give feedback.
-
Could you tell me how did you solved that issue |
Beta Was this translation helpful? Give feedback.
-
Terraform Version
Terraform v1.6.3
on linux_amd64
OS
Ubuntu 22.04.3 LTS (6.2.0-35-generic #35~22.04.1-Ubuntu )
Debug Output
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Plugin did not respond
│
│ with data.digitalocean_kubernetes_cluster.cicd-cluster,
│ on datasources.tf line 1, in data "digitalocean_kubernetes_cluster" "cicd-cluster":
│ 1: data "digitalocean_kubernetes_cluster" "cicd-cluster" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin
│ logs may contain more details.
╵
Releasing state lock. This may take a few moments...
Stack trace from the terraform-provider-digitalocean_v2.31.0 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xd0b42c]
goroutine 24 [running]:
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/kubernetes.flattenCredentials({0xc000921160, 0x5}, {0xc000921168, 0x4}, 0x0)
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/kubernetes/resource_kubernetes_cluster.go:680 +0x4c
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/kubernetes.digitaloceanKubernetesClusterRead(0xc00043c000, 0xc000894360, 0x24?)
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/kubernetes/resource_kubernetes_cluster.go:409 +0xccc
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/kubernetes.dataSourceDigitalOceanKubernetesClusterRead({0x12a8ac0?, 0xc000889380?}, 0x0?, {0xe93100?, 0xc00054e840?})
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/kubernetes/datasource_kubernetes_cluster.go:156 +0x245
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc0004d8e00, {0x12a8ac0, 0xc000889380}, 0xd?, {0xe93100, 0xc00054e840})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:724 +0x11b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).ReadDataApply(0xc0004d8e00, {0x12a8ac0, 0xc000889380}, 0xc0008a6600, {0xe93100, 0xc00054e840})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:943 +0x13b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadDataSource(0xc00042d7e8, {0x12a8ac0?, 0xc000889290?}, 0xc000162f80)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1195 +0x366
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadDataSource(0xc0003fe320, {0x12a8ac0?, 0xc000888420?}, 0xc0001003c0)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:658 +0x3de
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadDataSource_Handler({0xf75000?, 0xc0003fe320}, {0x12a8ac0, 0xc000888420}, 0xc000156230, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:421 +0x169
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00043a000, {0x12ad700, 0xc0006829c0}, 0xc000800000, 0xc00054fbf0, 0x19534f0, 0x0)
google.golang.org/[email protected]/server.go:1336 +0xd67
google.golang.org/grpc.(*Server).handleStream(0xc00043a000, {0x12ad700, 0xc0006829c0}, 0xc000800000, 0x0)
google.golang.org/[email protected]/server.go:1704 +0x9e7
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/[email protected]/server.go:965 +0x8d
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 13
google.golang.org/[email protected]/server.go:963 +0x246
Error: The terraform-provider-digitalocean_v2.31.0 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.
Beta Was this translation helpful? Give feedback.
All reactions