Skip to content

Datasource rediscloud_database causes panic in version 2.1.4 #631

@atsui-bay1

Description

@atsui-bay1

I attempted to upgrade from version 2.0.0 to 2.1.4 and encountered the following panic

Terraform:

data "rediscloud_database" "database" {
  subscription_id = "<My Subscription Id>"
  name            = "shared"
}

Error:

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: Plugin did not respond
│ 
│   with data.rediscloud_database.database,
│   on redis.tf line 23, in data "rediscloud_database" "database":
│   23: data "rediscloud_database" "database" {
│ 
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more details.
╵
╷
│ Error: Request cancelled
│ 
│   with data.rediscloud_database.database,
│   on redis.tf line 23, in data "rediscloud_database" "database":
│   23: data "rediscloud_database" "database" {
│ 
│ The plugin.(*GRPCProvider).ReadDataSource request was cancelled.
╵

Stack trace from the terraform-provider-rediscloud_v2.1.5 plugin:

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

goroutine 58 [running]:
github.com/RedisLabs/terraform-provider-rediscloud/provider.dataSourceRedisCloudProDatabaseRead({0x1012789d8, 0x140003cea10}, 0x14000411900, {0x1010f5220?, 0x1400007e750})
        github.com/RedisLabs/terraform-provider-rediscloud/provider/datasource_rediscloud_pro_database.go:484 +0x1a18
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x140001bd800, {0x101278930, 0x140001b6a20}, 0x14000411900, {0x1010f5220, 0x1400007e750})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.36.1/helper/schema/resource.go:855 +0xe4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).ReadDataApply(0x140001bd800, {0x101278930, 0x140001b6a20}, 0x14000411800, {0x1010f5220, 0x1400007e750})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.36.1/helper/schema/resource.go:1075 +0x110
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadDataSource(0x14000354720, {0x101278930?, 0x140001b67e0?}, 0x140001b6780)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.36.1/helper/schema/grpc_provider.go:1474 +0x5a4
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadDataSource(0x14000424640, {0x101278930?, 0x140000b3890?}, 0x140003a4fa0)
        github.com/hashicorp/terraform-plugin-go@v0.26.0/tfprotov5/tf5server/server.go:688 +0x1d8
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadDataSource_Handler({0x10124d340, 0x14000424640}, {0x101278930, 0x140000b3890}, 0x14000411300, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.26.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:665 +0x1c0
google.golang.org/grpc.(*Server).processUnaryRPC(0x14000276200, {0x101278930, 0x140000b3830}, 0x14000470f00, 0x14000405a70, 0x1018076a0, 0x0)
        google.golang.org/grpc@v1.69.4/server.go:1392 +0xc58
google.golang.org/grpc.(*Server).handleStream(0x14000276200, {0x101279148, 0x140004fc000}, 0x14000470f00)
        google.golang.org/grpc@v1.69.4/server.go:1802 +0x910
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/grpc@v1.69.4/server.go:1030 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 23
        google.golang.org/grpc@v1.69.4/server.go:1041 +0x13c

Error: The terraform-provider-rediscloud_v2.1.5 plugin crashed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions