terraform-provider-yandex
terraform-provider-yandex copied to clipboard
Impossible to create yandex_mdb_opensearch_cluster without dashboards block: provider crashed
resource "yandex_mdb_opensearch_cluster" "foo" {
name = "test"
environment = "PRESTABLE"
network_id = "${yandex_vpc_network.foo.id}"
config {
admin_password = "super-password"
opensearch {
node_groups {
name = "group0"
assign_public_ip = true
hosts_count = 1
subnet_ids = ["${yandex_vpc_subnet.foo.id}"]
zone_ids = ["ru-central1-a"]
roles = ["data", "manager"]
resources {
resource_preset_id = "s2.micro"
disk_size = 10737418240
disk_type_id = "network-ssd"
}
}
}
}
maintenance_window {
type = "ANYTIME"
}
}
resource "yandex_vpc_network" "foo" {}
resource "yandex_vpc_subnet" "foo" {
zone = "ru-central1-a"
network_id = "${yandex_vpc_network.foo.id}"
v4_cidr_blocks = ["10.5.0.0/24"]
}
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with
the following symbols:
+ create
Terraform planned the following actions, but then encountered a problem:
# yandex_vpc_network.foo will be created
+ resource "yandex_vpc_network" "foo" {
+ created_at = (known after apply)
+ default_security_group_id = (known after apply)
+ folder_id = (known after apply)
+ id = (known after apply)
+ labels = (known after apply)
+ name = (known after apply)
+ subnet_ids = (known after apply)
}
# yandex_vpc_subnet.foo will be created
+ resource "yandex_vpc_subnet" "foo" {
+ created_at = (known after apply)
+ folder_id = (known after apply)
+ id = (known after apply)
+ labels = (known after apply)
+ name = (known after apply)
+ network_id = (known after apply)
+ v4_cidr_blocks = [
+ "10.5.0.0/24",
]
+ v6_cidr_blocks = (known after apply)
+ zone = "ru-central1-a"
}
Plan: 2 to add, 0 to change, 0 to destroy.
╷
│ Error: Plugin did not respond
│
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).PlanResourceChange call.
│ The plugin logs may contain more details.
╵
Stack trace from the terraform-provider-yandex_v0.106.0 plugin:
panic: runtime error: index out of range [0] with length 0
goroutine 41 [running]:
github.com/yandex-cloud/terraform-provider-yandex/yandex.expandOpenSearchConfigCreateSpec({0x28d8780?, 0xc0016df728?})
github.com/yandex-cloud/terraform-provider-yandex/yandex/mdb_opensearch_structures.go:107 +0x473
github.com/yandex-cloud/terraform-provider-yandex/yandex.opensearchNodeGroupsDiffCustomize({0x32b1440?, 0xc000ebef60?}, 0x2f759b0?, {0xd?, 0x2f7d196?})
github.com/yandex-cloud/terraform-provider-yandex/yandex/mdb_opensearch_structures.go:643 +0x211
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc000d1db00, {0x32b1440, 0xc000ebef60}, 0xc000edaea0, 0xc00161c2a0, 0x302bec0, {0x2c8c2a0, 0xc000b031e0}, 0x0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:698 +0x4d4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0x32b2240?, {0x32b1440?, 0xc000ebef60?}, 0xc000edaea0, 0x2a26ce0?, {0x2c8c2a0?, 0xc000b031e0?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:962 +0xe5
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).PlanResourceChange(0xc0005a25e8, {0x32b1440?, 0xc000ebed50?}, 0xc000ec0190)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:747 +0xa09
github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.PlanResourceChange({{0x32bb9c8?, 0xc0005a25e8?}}, {0x32b1440, 0xc000ebed50}, 0x0?)
github.com/hashicorp/[email protected]/tf5to6server/tf5to6server.go:81 +0x5a
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.muxServer.PlanResourceChange({0xc000db4270, 0xc00119f0c0, 0xc000db42a0, 0xc000db42d0, {0xc0008c3580, 0x2, 0x2}}, {0x32b1440?, 0xc000ebea20?}, 0xc000ec0140)
github.com/hashicorp/[email protected]/tf6muxserver/mux_server_PlanResourceChange.go:66 +0x247
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).PlanResourceChange(0xc000af0aa0, {0x32b1440?, 0xc000ebe210?}, 0xc000334000)
github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:784 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_PlanResourceChange_Handler({0x2e8b800?, 0xc000af0aa0}, {0x32b1440, 0xc000ebe210}, 0xc000ed4000, 0x0)
github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:404 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000b3f000, {0x32b1440, 0xc000ebe180}, {0x32ba180, 0xc000bd6680}, 0xc000ec6000, 0xc000e48120, 0x4b60c48, 0x0)
google.golang.org/[email protected]/server.go:1372 +0xe49
google.golang.org/grpc.(*Server).handleStream(0xc000b3f000, {0x32ba180, 0xc000bd6680}, 0xc000ec6000)
google.golang.org/[email protected]/server.go:1783 +0x1031
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1016 +0x68
created by google.golang.org/grpc.(*Server).serveStreams.func2
google.golang.org/[email protected]/server.go:1027 +0x12e
Error: The terraform-provider-yandex_v0.106.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.
➜ test git:(app01) ✗ terraform apply > test
╷
│ Error: Plugin did not respond
│
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).PlanResourceChange call.
│ The plugin logs may contain more details.
╵
Stack trace from the terraform-provider-yandex_v0.106.0 plugin:
panic: runtime error: index out of range [0] with length 0
goroutine 107 [running]:
github.com/yandex-cloud/terraform-provider-yandex/yandex.expandOpenSearchConfigCreateSpec({0x28d8780?, 0xc001610240?})
github.com/yandex-cloud/terraform-provider-yandex/yandex/mdb_opensearch_structures.go:107 +0x473
github.com/yandex-cloud/terraform-provider-yandex/yandex.opensearchNodeGroupsDiffCustomize({0x32b1440?, 0xc00150a360?}, 0x2f759b0?, {0xd?, 0x2f7d196?})
github.com/yandex-cloud/terraform-provider-yandex/yandex/mdb_opensearch_structures.go:643 +0x211
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc000debb00, {0x32b1440, 0xc00150a360}, 0xc00135bc70, 0xc00151b680, 0x302bec0, {0x2c8c2a0, 0xc000c16dc0}, 0x0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/schema.go:698 +0x4d4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0x32b2240?, {0x32b1440?, 0xc00150a360?}, 0xc00135bc70, 0x2a26ce0?, {0x2c8c2a0?, 0xc000c16dc0?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:962 +0xe5
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).PlanResourceChange(0xc000710618, {0x32b1440?, 0xc00150a150?}, 0xc0012791d0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:747 +0xa09
github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.PlanResourceChange({{0x32bb9c8?, 0xc000710618?}}, {0x32b1440, 0xc00150a150}, 0x0?)
github.com/hashicorp/[email protected]/tf5to6server/tf5to6server.go:81 +0x5a
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.muxServer.PlanResourceChange({0xc000e82270, 0xc00103cb70, 0xc000e822a0, 0xc000e822d0, {0xc000c18e00, 0x2, 0x2}}, {0x32b1440?, 0xc001371e00?}, 0xc001279180)
github.com/hashicorp/[email protected]/tf6muxserver/mux_server_PlanResourceChange.go:66 +0x247
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).PlanResourceChange(0xc000a7eb40, {0x32b1440?, 0xc0013715f0?}, 0xc0002305b0)
github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:784 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_PlanResourceChange_Handler({0x2e8b800?, 0xc000a7eb40}, {0x32b1440, 0xc0013715f0}, 0xc001339b00, 0x0)
github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:404 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000ae9000, {0x32b1440, 0xc001371560}, {0x32ba180, 0xc000f1cd00}, 0xc001376ea0, 0xc000f1a120, 0x4b60c48, 0x0)
google.golang.org/[email protected]/server.go:1372 +0xe49
google.golang.org/grpc.(*Server).handleStream(0xc000ae9000, {0x32ba180, 0xc000f1cd00}, 0xc001376ea0)
google.golang.org/[email protected]/server.go:1783 +0x1031
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1016 +0x68
created by google.golang.org/grpc.(*Server).serveStreams.func2
google.golang.org/[email protected]/server.go:1027 +0x12e
Error: The terraform-provider-yandex_v0.106.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.
I think that https://github.com/yandex-cloud/terraform-provider-yandex/pull/404 should help
@KoDA82 can we merge #404?
got same error on v0.107.0
Issue should be resolved with the v0.115.0 release. https://github.com/yandex-cloud/terraform-provider-yandex/releases/tag/v0.115.0
For more information, see (issue 423)