banyansecurity / terraform-aws-banyan-accesstier2

Apache License 2.0
1 stars 8 forks source link

Plugin crash on v1.0.0 #18

Closed dannykansas closed 2 days ago

dannykansas commented 4 months ago

System Info

Full output from Terraform:

╷
│ Error: Plugin did not respond
│
│   with module.aws_accesstier.banyan_api_key.accesstier,
│   on .terraform/modules/aws_accesstier/banyan.tf line 35, in resource "banyan_api_key" "accesstier":
│   35: resource "banyan_api_key" "accesstier" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-banyan_v1.0.0 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x40 pc=0x1047b25dc]

goroutine 56 [running]:
github.com/banyansecurity/terraform-banyan-provider/client/restclient.HandleResponse(0x0, {0x1400003a640, 0x33})
        github.com/banyansecurity/terraform-banyan-provider/client/restclient/restclient.go:268 +0x3c
github.com/banyansecurity/terraform-banyan-provider/client/restclient.(*Client).Read(0x14000577058?, {0x104b759ca?, 0x14000577028?}, {0x104b76ba8?, 0x7?}, {0x140000346c0?, 0x24?}, {0x0?, 0x14000577058?})
        github.com/banyansecurity/terraform-banyan-provider/client/restclient/restclient.go:192 +0x130
github.com/banyansecurity/terraform-banyan-provider/client/apikey.(*ApiKey).Get(0x14000577118?, {0x140000346c0?, 0x2deaff2b9e01?})
        github.com/banyansecurity/terraform-banyan-provider/client/apikey/apikey.go:34 +0x64
github.com/banyansecurity/terraform-banyan-provider/banyan.resourceApiKeyRead({0x104e252e0?, 0x14000383560?}, 0x14000391c80, {0x104ce62e0?, 0x140000dc0c0})
        github.com/banyansecurity/terraform-banyan-provider/banyan/resource_api_key.go:88 +0xfc
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x140001ffdc0, {0x104e252e0, 0x14000383560}, 0xd?, {0x104ce62e0, 0x140000dc0c0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.0/helper/schema/resource.go:724 +0xec
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0x140001ffdc0, {0x104e252e0, 0x14000383560}, 0x1400054d2b0, {0x104ce62e0, 0x140000dc0c0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.0/helper/schema/resource.go:1015 +0x46c
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0x14000446480, {0x104e252e0?, 0x14000383440?}, 0x1400055b3c0)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.0/helper/schema/grpc_provider.go:613 +0x40c
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0x140002d2960, {0x104e252e0?, 0x14000382c60?}, 0x14000097200)
        github.com/hashicorp/terraform-plugin-go@v0.14.1/tfprotov5/tf5server/server.go:748 +0x3ec
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x104dee420?, 0x140002d2960}, {0x104e252e0, 0x14000382c60}, 0x14000572b60, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.14.1/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x174
google.golang.org/grpc.(*Server).processUnaryRPC(0x140002fa1e0, {0x104e28020, 0x140003961a0}, 0x1400015b200, 0x14000443ce0, 0x1052a9250, 0x0)
        google.golang.org/grpc@v1.50.1/server.go:1340 +0xb90
google.golang.org/grpc.(*Server).handleStream(0x140002fa1e0, {0x104e28020, 0x140003961a0}, 0x1400015b200, 0x0)
        google.golang.org/grpc@v1.50.1/server.go:1713 +0x840
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/grpc@v1.50.1/server.go:965 +0x88
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/grpc@v1.50.1/server.go:963 +0x298

Error: The terraform-provider-banyan_v1.0.0 plugin crashed!
nareshkakubal commented 4 months ago

Hi @dannykansas We've tried all possible combinations to reproduce the issue internally but haven't had any success. The plugin has encountered an error in a scenario where failure is nearly impossible, which is why we would need additional information.

To help resolve this, could you please consider the following steps if the issue persists:

1) It appears you are using an older version of the provider, version 1.0.0. The current release is 1.2.11. You might try using version = ">= 1.0.0" to always fetch the latest released version of the provider or version = "1.2.11" to use the current latest version. 2) Please try running the same command with TF_LOG=DEBUG and share the logs with us. This will help us understand what exactly is happening.