terraform-provider-mongodbatlas: Error when create or import cluster - panic: runtime error: invalid memory address or nil pointer dereference

Terraform version: 0.12.26
Go runtime version: go1.12.13 found provider “terraform-provider-mongodbatlas_v0.6.0_x4”


Error: rpc error: code = Unavailable desc = transport is closing


panic: runtime error: invalid memory address or nil pointer dereference
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xe0a598]
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: 
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: goroutine 41 [running]:
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: github.com/terraform-providers/terraform-provider-mongodbatlas/mongodbatlas.flattenProcessArgs(...)
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/mongodbatlas/resource_mongodbatlas_cluster.go:1176
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: github.com/terraform-providers/terraform-provider-mongodbatlas/mongodbatlas.resourceMongoDBAtlasClusterRead(0xc0002a8850, 0xfbd740, 0xc0004f4a00, 0xc0002a8850, 0x0)
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/mongodbatlas/resource_mongodbatlas_cluster.go:732 +0x2f38
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0000f4480, 0xc00008cf50, 0xfbd740, 0xc0004f4a00, 0xc00028ce10, 0x0, 0x0)
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go:460 +0x119
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc0006da0d8, 0x135b560, 0xc000369a70, 0xc0006c2600, 0xc0006da0d8, 0xc000369a70, 0xc00054cb88)
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin/grpc_provider.go:525 +0x3d8
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler(0x1068e00, 0xc0006da0d8, 0x135b560, 0xc000369a70, 0xc0006c25a0, 0x0, 0x135b560, 0xc000369a70, 0xc0008c2480, 0x41d)
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.pb.go:3269 +0x217
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003f01a0, 0x1366a00, 0xc000202a80, 0xc000192300, 0xc000180f60, 0x1ac0eb0, 0x0, 0x0, 0x0)
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/google.golang.org/grpc/server.go:1082 +0x50a
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: google.golang.org/grpc.(*Server).handleStream(0xc0003f01a0, 0x1366a00, 0xc000202a80, 0xc000192300, 0x0)
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/google.golang.org/grpc/server.go:1405 +0xcc9
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0002801d0, 0xc0003f01a0, 0x1366a00, 0xc000202a80, 0xc000192300)
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/google.golang.org/grpc/server.go:746 +0xa1
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4: created by google.golang.org/grpc.(*Server).serveStreams.func1
2020-06-13T22:19:49.509-0300 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/google.golang.org/grpc/server.go:744 +0xa1
2020/06/13 22:19:49 [ERROR] <root>: eval: *terraform.EvalRefresh, err: rpc error: code = Unavailable desc = transport is closing
2020/06/13 22:19:49 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020-06-13T22:19:49.514-0300 [DEBUG] plugin: plugin process exited: path=/home/afonsorodrigues/projetos/meus-projetos/mongodb-terraform-example/.terraform/plugins/linux_amd64/terraform-provider-mongodbatlas_v0.6.0_x4 pid=19739 error="exit status 2"
2020/06/13 22:19:49 [TRACE] [walkImport] Exiting eval tree: import mongodbatlas_cluster.cluster_example result
2020/06/13 22:19:49 [TRACE] vertex "import mongodbatlas_cluster.cluster_example result": visit complete
2020/06/13 22:19:49 [TRACE] vertex "mongodbatlas_cluster.cluster_example (import id \"5ee571492eb6b363bdb4fe9b-clusterterraform\")": dynamic subgraph encountered errors
2020/06/13 22:19:49 [TRACE] vertex "mongodbatlas_cluster.cluster_example (import id \"5ee571492eb6b363bdb4fe9b-clusterterraform\")": visit complete
2020/06/13 22:19:49 [TRACE] dag/walk: upstream of "provider.mongodbatlas (close)" errored, so skipping
2020/06/13 22:19:49 [TRACE] dag/walk: upstream of "root" errored, so skipping
2020/06/13 22:19:49 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2020/06/13 22:19:49 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock
2020-06-13T22:19:49.515-0300 [DEBUG] plugin: plugin exited

When change version from “v0.6.0” to “v0.5.1”, I created the cluster.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (2 by maintainers)

Most upvoted comments

Thanks @PacoDw and @themantissa, I will check de fix and report.

Hello @WafflesMcDuff, thank you so much for sharing your log files with us, they really helped us find the issue. I created a PR with the fix, also I tested with your TF configuration and all it’s okay, so could you test with that branch to check if now it’s okay?

Let us know if you have another comment or concern 👍

Thanks @themantissa, I’ll migrate the provider to 0.6.1 as soon its is disponible. Thank’s for your answer and review.