Terraform plugin crashed v1.35.0

Terrafom is crashing repeatedly with below error. We are using the latest terraform and the provider version. Need help here.

╷
│ Error: Plugin did not respond
│ 
│   with genesyscloud_tf_export.export,
│   on main.tf line 15, in resource "genesyscloud_tf_export" "export":
│   15: resource "genesyscloud_tf_export" "export" {
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain
│ more details.
╵

Stack trace from the terraform-provider-genesyscloud_v1.35.0 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1bb0c0d]

goroutine 303 [running]:
terraform-provider-genesyscloud/genesyscloud/resource_exporter.MemberGroupsResolver(0x21f4fd9?, 0x2c?, {0xc000a9e100?, 0x2c?})
	terraform-provider-genesyscloud/genesyscloud/resource_exporter/resource_exporter_custom.go:26 +0x28d
terraform-provider-genesyscloud/genesyscloud/tfexporter.(*GenesysCloudResourceExporter).sanitizeConfigMap(0xc000715290?, {0x21d7e4b, 0x1a}, {0xc000572390, 0xd}, 0x10?, {0xc0005cdbe0, 0x1c}, 0x1?, 0x1, ...)
	terraform-provider-genesyscloud/genesyscloud/tfexporter/genesyscloud_resource_exporter.go:1248 +0x1590
terraform-provider-genesyscloud/genesyscloud/tfexporter.(*GenesysCloudResourceExporter).sanitizeConfigArray(0x5?, {0x21d7e4b, 0x1a}, {0xc000572390, 0xd}, {0xc000864660, 0x1, 0x2d8f300?}, {0xc0005cdbe0, 0x1c}, ...)
	terraform-provider-genesyscloud/genesyscloud/tfexporter/genesyscloud_resource_exporter.go:1350 +0x5fb
terraform-provider-genesyscloud/genesyscloud/tfexporter.(*GenesysCloudResourceExporter).sanitizeConfigMap(0xc000715290?, {0x21d7e4b, 0x1a}, {0xc000572390, 0xd}, 0xd59fdd9aee16c064?, {0xc000573f40, 0xe}, 0x8e?, 0x1, ...)
	terraform-provider-genesyscloud/genesyscloud/tfexporter/genesyscloud_resource_exporter.go:1176 +0x79a
terraform-provider-genesyscloud/genesyscloud/tfexporter.(*GenesysCloudResourceExporter).sanitizeConfigArray(0x5?, {0x21d7e4b, 0x1a}, {0xc000572390, 0xd}, {0xc000864670, 0x1, 0x0?}, {0xc000573f40, 0xe}, ...)
	terraform-provider-genesyscloud/genesyscloud/tfexporter/genesyscloud_resource_exporter.go:1350 +0x5fb
terraform-provider-genesyscloud/genesyscloud/tfexporter.(*GenesysCloudResourceExporter).sanitizeConfigMap(0xc001992060?, {0x21d7e4b, 0x1a}, {0xc000572390, 0xd}, 0xc000a9ecf8?, {0x0, 0x0}, 0x340?, 0x1, ...)
	terraform-provider-genesyscloud/genesyscloud/tfexporter/genesyscloud_resource_exporter.go:1176 +0x79a
terraform-provider-genesyscloud/genesyscloud/tfexporter.(*GenesysCloudResourceExporter).buildResourceConfigMap(0xc000a5f900)
	terraform-provider-genesyscloud/genesyscloud/tfexporter/genesyscloud_resource_exporter.go:369 +0x5ec
terraform-provider-genesyscloud/genesyscloud/tfexporter.(*GenesysCloudResourceExporter).buildAndExportDependentResources(0xc000a5f900)
	terraform-provider-genesyscloud/genesyscloud/tfexporter/genesyscloud_resource_exporter.go:590 +0x159
terraform-provider-genesyscloud/genesyscloud/tfexporter.(*GenesysCloudResourceExporter).Export(0x25391a8?)
	terraform-provider-genesyscloud/genesyscloud/tfexporter/genesyscloud_resource_exporter.go:191 +0x85
terraform-provider-genesyscloud/genesyscloud/tfexporter.createTfExport({0x25391a8, 0xc000815380}, 0x0?, {0x1f12a60, 0xc00088c510})
	terraform-provider-genesyscloud/genesyscloud/tfexporter/resource_genesyscloud_tf_export.go:146 +0x85
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc00046c380, {0x25391e0, 0xc0008141e0}, 0xd?, {0x1f12a60, 0xc00088c510})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:778 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00046c380, {0x25391e0, 0xc0008141e0}, 0xc000917040, 0xc000a2d480, {0x1f12a60, 0xc00088c510})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:909 +0xa7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00070e3d8, {0x25391e0?, 0xc0006ddf80?}, 0xc0009b5130)
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:1078 +0xe8d
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0003f32c0, {0x25391e0?, 0xc0006dd590?}, 0xc000a2a540)
	github.com/hashicorp/terraform-plugin-go@v0.22.0/tfprotov5/tf5server/server.go:846 +0x3dc
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x212d720?, 0xc0003f32c0}, {0x25391e0, 0xc0006dd590}, 0xc000a2cc80, 0x0)
	github.com/hashicorp/terraform-plugin-go@v0.22.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002a3200, {0x25391e0, 0xc0006dd500}, {0x253d1d8, 0xc000007a00}, 0xc000a31e60, 0xc000481ec0, 0x2d44118, 0x0)
	google.golang.org/grpc@v1.61.1/server.go:1385 +0xe49
google.golang.org/grpc.(*Server).handleStream(0xc0002a3200, {0x253d1d8, 0xc000007a00}, 0xc000a31e60)
	google.golang.org/grpc@v1.61.1/server.go:1796 +0x1031
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	google.golang.org/grpc@v1.61.1/server.go:1029 +0x91
created by google.golang.org/grpc.(*Server).serveStreams.func2
	google.golang.org/grpc@v1.61.1/server.go:1040 +0x145

Error: The terraform-provider-genesyscloud_v1.35.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 Tejaswini_Nayak

Thanks for letting us know. We will get a ticket open on it and have someone take a look at it.

Thanks,
John Carnell
Director, Developer Engagement

Hi @Tejaswini_Nayak

I was able to recreate the stack trace you saw, so I believe I know what caused this behaviour your seeing. However, I can't be sure that the changes I've made to the code base will fix your problem without getting more information about your Genesys Cloud environment, and so we're hesitant to do an early official release. Instead, you can test out the branch containing the fix by cloning our open source repo and compiling the provider locally.

Here is the branch: https://github.com/MyPureCloud/terraform-provider-genesyscloud/tree/bug/DEVTOOLING-530

Here is the section of our README that describes how to reference a local build of the provider from your terraform configuration: https://github.com/MyPureCloud/terraform-provider-genesyscloud/tree/bug/DEVTOOLING-530

Let me know if the above info helps you get around your problem, and we'll go from there.

Thanks,
Charlie

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.