Open shemau opened 1 month ago
@shemau Can you provide values for the variables you are using?
I will try and narrow it down and gather those values @alexhemard
It has something to do with the group block. When commented out, it passes, otherwise it fails:
+ resource "ibm_database" "elasticsearch" {
+ adminuser = (known after apply)
+ backup_encryption_key_crn = (known after apply)
+ configuration_schema = (known after apply)
+ connectionstrings = (known after apply)
+ groups = (known after apply)
+ guid = (known after apply)
+ id = (known after apply)
+ key_protect_key = (known after apply)
+ location = "us-south"
+ name = "steve-es"
+ plan = "enterprise"
+ resource_controller_url = (known after apply)
+ resource_crn = (known after apply)
+ resource_group_id = (known after apply)
+ resource_group_name = (known after apply)
+ resource_name = (known after apply)
+ resource_status = (known after apply)
+ service = "databases-for-elasticsearch"
+ service_endpoints = "private"
+ status = (known after apply)
+ tags = (known after apply)
+ version = "8.12"
+ timeouts {
+ create = "120m"
}
}
gives the base values.
the group block values are:
group {
group_id = "member"
memory {
allocation_mb = 4096 # also tried 1024
}
disk {
allocation_mb = 5120
}
cpu {
allocation_count = 0
}
members {
allocation_count = 3
}
}
@alexhemard any news on this? This is a total blocker, we are pushing up provider levels to get necessary fixes (and features) and this is blocking progress.
I have recreate on 1.66.0 to demonstrate that the problem still exists in the latest version.
│ Error: Plugin did not respond
│
│ with module.elasticsearch.module.elasticsearch.ibm_database.elasticsearch,
│ on ../../main.tf line 45, in resource "ibm_database" "elasticsearch":
│ 45: resource "ibm_database" "elasticsearch" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).PlanResourceChange call. The plugin logs may
│ contain more details.
╵
Stack trace from the terraform-provider-ibm_v1.66.0 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6390487]
goroutine 87 [running]:
github.com/IBM/cloud-databases-go-sdk/clouddatabasesv5.(*CloudDatabasesV5).GetEnableGzipCompression(...)
github.com/IBM/cloud-databases-go-sdk@v0.7.0/clouddatabasesv5/cloud_databases_v5.go:179
github.com/IBM/cloud-databases-go-sdk/clouddatabasesv5.(*CloudDatabasesV5).GetDefaultScalingGroupsWithContext(0x0, {0xae78580, 0xd1089c0}, 0xc0019b82a0)
github.com/IBM/cloud-databases-go-sdk@v0.7.0/clouddatabasesv5/cloud_databases_v5.go:1595 +0x267
github.com/IBM/cloud-databases-go-sdk/clouddatabasesv5.(*CloudDatabasesV5).GetDefaultScalingGroups(0xc00290b0e0?, 0xc0004da4e0?)
github.com/IBM/cloud-databases-go-sdk@v0.7.0/clouddatabasesv5/cloud_databases_v5.go:1571 +0x25
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database.getDefaultScalingGroups({0xc0004da4e0, 0x1b}, {0xc0029feda4, 0xa}, {0x0, 0x0}, {0xae1c660?, 0xc0017a2008?})
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database/resource_ibm_database.go:1065 +0x3c5
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database.validateGroupsDiff({0x0?, 0x0?}, 0xc00221ca00, {0xae1c660, 0xc0017a2008})
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database/resource_ibm_database.go:2949 +0x1dc
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/database.ResourceIBMDatabaseInstance.All.func3({0xae784a0, 0xc002a85830}, 0xc00221ca00, {0xae1c660, 0xc0017a2008})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/customdiff/compose.go:53 +0xab
github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider.wrapResource.wrapCustomizeDiff.func17({0xae784a0?, 0xc002a85830?}, 0x9669be8?, {0xae1c660?, 0xc0017a2008?})
github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider/provider.go:1636 +0x3e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc0012020f0, {0xae784a0, 0xc002a85830}, 0xc002a8b930, 0xc0022b2b10, 0xc00085ab40, {0xae1c660, 0xc0017a2008}, 0x0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/schema.go:698 +0x4b4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0xae78708?, {0xae784a0?, 0xc002a85830?}, 0xc002a8b930, 0xc002a85860?, {0xae1c660?, 0xc0017a2008?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:962 +0xdb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).PlanResourceChange(0xc000a76e70, {0xae784a0?, 0xc002a85770?}, 0xc0029a4460)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/grpc_provider.go:780 +0x996
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).PlanResourceChange(0xc00079ad20, {0xae784a0?, 0xc002a84420?}, 0xc002a83110)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/tf5server/server.go:824 +0x56f
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_PlanResourceChange_Handler({0xac8ece0, 0xc00079ad20}, {0xae784a0, 0xc002a84420}, 0xc002a830a0, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:449 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000a80000, {0xae84460, 0xc0013dc000}, 0xc002a9c000, 0xc001706720, 0xd06e7c0, 0x0)
google.golang.org/grpc@v1.57.1/server.go:1358 +0xde3
google.golang.org/grpc.(*Server).handleStream(0xc000a80000, {0xae84460, 0xc0013dc000}, 0xc002a9c000, 0x0)
google.golang.org/grpc@v1.57.1/server.go:1735 +0x9da
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/grpc@v1.57.1/server.go:970 +0xbb
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 86
google.golang.org/grpc@v1.57.1/server.go:981 +0x136
Error: The terraform-provider-ibm_v1.66.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.
Hi @shemau! Unfortunately, I cannot replicate the issue on the latest provider.
The following configuration
resource "ibm_database" "elasticsearch" {
name = "test-icd-elasticsearch"
plan = "enterprise"
location = "us-south"
service = "databases-for-elasticsearch"
version = "8.12"
resource_group_id = "default"
service_endpoints = "private"
group {
group_id = "member"
memory {
allocation_mb = 4096
}
disk {
allocation_mb = 5120
}
cpu {
allocation_count = 0
}
members {
allocation_count = 3
}
}
}
Works fine for me. Can you please provide the debug logs (export TF_LOG=DEBUG
) so I can best help you?
Thanks!
Community Note
Terraform CLI and Terraform IBM Provider Version
terraform v1.5.7 ibm provider 1.65.1
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
https://github.com/terraform-ibm-modules/terraform-ibm-icd-elasticsearch/
Debug Output
Panic Output
Expected Behavior
This is running off our
main
branch, where before merging it passed and created an elastic search ICD instance.Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
0000