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

Provider crashes when creating empty binding for Lockbox secret

Open MikailBag opened this issue 8 months ago • 0 comments

spec:

resource "yandex_lockbox_secret_iam_binding" "access" {
  secret_id = var.info_secret_id
  role      = "lockbox.secrets.payloadViewer"
  members    = []
}

Outcome:

Stack trace from the terraform-provider-yandex_v0.121.0 plugin:

panic: runtime error: index out of range [0] with length 0

goroutine 40 [running]:
github.com/yandex-cloud/terraform-provider-yandex/yandex.resourceIamBinding.resourceAccessBindingCreate.func1({0x2839720, 0xc0004736c0}, 0x0?, {0x21623a0?, 0xc0009726e0?})
	github.com/yandex-cloud/terraform-provider-yandex/yandex/iam_binding.go:76 +0x245
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc000b2a540, {0x2839678, 0xc000c5d800}, 0xd?, {0x21623a0, 0xc0009726e0})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:778 +0x11b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000b2a540, {0x2839678, 0xc000c5d800}, 0xc000d96b60, 0xc000a90c00, {0x21623a0, 0xc0009726e0})
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:909 +0xa89
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00053f170, {0x2839678?, 0xc000c5d650?}, 0xc000c62690)
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1078 +0xdbc
github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.ApplyResourceChange({{0x2845540?, 0xc00053f170?}}, {0x2839678, 0xc000c5d650}, 0x0?)
	github.com/hashicorp/[email protected]/tf5to6server/tf5to6server.go:47 +0x54
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.(*muxServer).ApplyResourceChange(0x28396b0?, {0x2839678?, 0xc000c5d350?}, 0xc000c62640)
	github.com/hashicorp/[email protected]/tf6muxserver/mux_server_ApplyResourceChange.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ApplyResourceChange(0xc000517f40, {0x2839678?, 0xc000c5c960?}, 0xc000472a10)
	github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:846 +0x3d0
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ApplyResourceChange_Handler({0x23da260?, 0xc000517f40}, {0x2839678, 0xc000c5c960}, 0xc000a90400, 0x0)
	github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:518 +0x169
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00085bc00, {0x2839678, 0xc000c5c8d0}, {0x2843528, 0xc000d80680}, 0xc000c5ea20, 0xc000cfd0e0, 0x429df38, 0x0)
	google.golang.org/[email protected]/server.go:1386 +0xe23
google.golang.org/grpc.(*Server).handleStream(0xc00085bc00, {0x2843528, 0xc000d80680}, 0xc000c5ea20)
	google.golang.org/[email protected]/server.go:1797 +0x100c
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	google.golang.org/[email protected]/server.go:1027 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 29
	google.golang.org/[email protected]/server.go:1038 +0x135

Error: The terraform-provider-yandex_v0.121.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.

2024-06-16T12:42:59.956+0300 [DEBUG] provider: plugin exited

Stack trace mentions this line

MikailBag avatar Jun 16 '24 09:06 MikailBag