Terraform is crashing while trying to create a subuser. Plan is successful but crashes when applying. Manual subuser creation successful and creation of other resources (dynamic template) through the provider is successful but not for subusers.
2021-03-08T16:04:19.150Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: 2021/03/08 16:04:19 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalCheckPlannedChange
2021/03/08 16:04:19 [TRACE] EvalCheckPlannedChange: Verifying that actual change (action Create) matches planned change (action Create)
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalGetProvider
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalReadState
2021/03/08 16:04:19 [TRACE] EvalReadState: reading state for sendgrid_subuser.user
2021/03/08 16:04:19 [TRACE] EvalReadState: no state present for sendgrid_subuser.user
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalReduceDiff
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalIf
2021/03/08 16:04:19 [TRACE] eval: terraform.EvalNoop
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalApplyPre
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalApply
2021/03/08 16:04:19 [DEBUG] EvalApply: ProviderMeta config value set
2021/03/08 16:04:19 [DEBUG] sendgrid_subuser.user: applying the planned Create change
2021/03/08 16:04:19 [TRACE] GRPCProvider: ApplyResourceChange
2021-03-08T16:04:19.157Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: panic: interface conversion: interface {} is *schema.Set, not []string
2021-03-08T16:04:19.157Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3:
2021-03-08T16:04:19.157Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: goroutine 68 [running]:
2021-03-08T16:04:19.157Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/trois-six/terraform-provider-sendgrid/sendgrid.resourceSendgridSubuserCreate(0x190d8e0, 0xc00006d1a0, 0xc00014d180, 0x17fa2c0, 0xc000015b30, 0xc0002422e0, 0x12d6e2a, 0xc0005311e0)
2021-03-08T16:04:19.157Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/trois-six/terraform-provider-sendgrid/sendgrid/resource_sendgrid_subuser.go:95 +0x5a5
2021-03-08T16:04:19.157Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc0003360b0, 0x190d860, 0xc0002360c0, 0xc00014d180, 0x17fa2c0, 0xc000015b30, 0x0, 0x0, 0x0)
2021-03-08T16:04:19.157Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:276 +0x1ea
2021-03-08T16:04:19.157Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0003360b0, 0x190d860, 0xc0002360c0, 0xc0001624d0, 0xc0005311e0, 0x17fa2c0, 0xc000015b30, 0x0, 0x0, 0x0, ...)
2021-03-08T16:04:19.157Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:387 +0x67b
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/v2/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc00027a1e0, 0x190d860, 0xc0002360c0, 0xc0001621c0, 0xc00027a1e0, 0xc00027a1f0, 0x1859b30)
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/[email protected]/internal/helper/plugin/grpc_provider.go:952 +0x8cf
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfplugin5._Provider_ApplyResourceChange_Handler.func1(0x190d860, 0xc0002360c0, 0x17f0fc0, 0xc0001621c0, 0xc0002360c0, 0x177a620, 0xc00006cb01, 0xc000530e80)
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3312 +0x89
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/v2/plugin.Serve.func3.1(0x190d920, 0xc0002a8cc0, 0x17f0fc0, 0xc0001621c0, 0xc000530e60, 0xc000530e80, 0xc000502ba0, 0x11c56c6, 0x17ca220, 0xc0002a8cc0)
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/[email protected]/plugin/serve.go:76 +0x87
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x17ff280, 0xc00027a1e0, 0x190d920, 0xc0002a8cc0, 0xc00006cb40, 0xc000531580, 0x190d920, 0xc0002a8cc0, 0xc0002341e0, 0x1d0)
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: github.com/hashicorp/terraform-plugin-sdk/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3314 +0x150
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: google.golang.org/grpc.(*Server).processUnaryRPC(0xc000238fc0, 0x1914d00, 0xc000083680, 0xc000160300, 0xc00008e720, 0x1d180e0, 0x0, 0x0, 0x0)
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: google.golang.org/[email protected]/server.go:1171 +0x522
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: google.golang.org/grpc.(*Server).handleStream(0xc000238fc0, 0x1914d00, 0xc000083680, 0xc000160300, 0x0)
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: google.golang.org/[email protected]/server.go:1494 +0xcc5
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0000961b0, 0xc000238fc0, 0x1914d00, 0xc000083680, 0xc000160300)
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: google.golang.org/[email protected]/server.go:834 +0xa5
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: created by google.golang.org/grpc.(*Server).serveStreams.func1
2021-03-08T16:04:19.158Z [DEBUG] plugin.terraform-provider-sendgrid_v0.1.3: google.golang.org/[email protected]/server.go:832 +0x1fd
2021-03-08T16:04:19.158Z [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2021-03-08T16:04:19.159Z [DEBUG] plugin: plugin process exited: path=.terraform/plugins/registry.terraform.io/trois-six/sendgrid/0.1.3/darwin_amd64/terraform-provider-sendgrid_v0.1.3 pid=14511 error="exit status 2"
2021/03/08 16:04:19 [DEBUG] sendgrid_subuser.user: apply errored, but we're indicating that via the Error pointer rather than returning it: rpc error: code = Unavailable desc = transport is closing
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalMaybeTainted
2021/03/08 16:04:19 [TRACE] EvalMaybeTainted: sendgrid_subuser.user encountered an error during creation, so it is now marked as tainted
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalWriteState
2021/03/08 16:04:19 [TRACE] EvalWriteState: removing state object for sendgrid_subuser.user
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalApplyProvisioners
2021/03/08 16:04:19 [TRACE] EvalApplyProvisioners: sendgrid_subuser.user has no state, so skipping provisioners
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalMaybeTainted
2021/03/08 16:04:19 [TRACE] EvalMaybeTainted: sendgrid_subuser.user encountered an error during creation, so it is now marked as tainted
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalWriteState
2021/03/08 16:04:19 [TRACE] EvalWriteState: removing state object for sendgrid_subuser.user
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalIf
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalIf
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalWriteDiff
2021/03/08 16:04:19 [TRACE] eval: *terraform.EvalApplyPost
2021/03/08 16:04:19 [ERROR] eval: *terraform.EvalApplyPost, err: rpc error: code = Unavailable desc = transport is closing
2021/03/08 16:04:19 [ERROR] eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2021/03/08 16:04:19 [TRACE] [walkApply] Exiting eval tree: sendgrid_subuser.user
2021/03/08 16:04:19 [TRACE] vertex "sendgrid_subuser.user": visit complete
2021/03/08 16:04:19 [TRACE] dag/walk: upstream of "provider["registry.terraform.io/trois-six/sendgrid"] (close)" errored, so skipping
2021/03/08 16:04:19 [TRACE] No provider meta schema returned
2021/03/08 16:04:19 [TRACE] GRPCProvider: Configure