alert-king-94787
08/31/2023, 4:20 PMterraform apply
to bootstrap rancher2
I'm launching a infrastructure as code with terraform and following docs like k3s HA + Rancher + Cert-manager.
Now I trying to run a rancher2 bootstrap but the execution return error in terraform-provider-rancher2_v3.1.1 plugin:
Error: Plugin did not respond
│
│ with module.rancher-server.rancher2_bootstrap.admin,
│ on ../../../../../../../infrastructure-modules/modules/aws-rancher-server/rancher.tf line 4, in resource "rancher2_bootstrap" "admin":
│ 4: resource "rancher2_bootstrap" "admin" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.
╵
Releasing state lock. This may take a few moments...
Stack trace from the terraform-provider-rancher2_v3.1.1 plugin:
panic: interface conversion: interface {} is nil, not string
goroutine 70 [running]:
<http://github.com/rancher/terraform-provider-rancher2/rancher2.DoUserLogin({0xc0001260c0|github.com/rancher/terraform-provider-rancher2/rancher2.DoUserLogin({0xc0001260c0>?, 0xc0010df4b8?}, {0x222af22, 0x5}, {0xc0010c606a, 0x5}, {0x222a46e, 0x5}, {0x228a036, 0x21}, ...)
/go/src/github.com/rancher/terraform-provider-rancher2/rancher2/util.go:154 +0x5f9
<http://github.com/rancher/terraform-provider-rancher2/rancher2.bootstrapDoLogin(0xc000b1f628|github.com/rancher/terraform-provider-rancher2/rancher2.bootstrapDoLogin(0xc000b1f628>?, {0x2221660?, 0xc000474180})
/go/src/github.com/rancher/terraform-provider-rancher2/rancher2/resource_rancher2_bootstrap.go:275 +0x445
<http://github.com/rancher/terraform-provider-rancher2/rancher2.resourceRancher2BootstrapCreate(0x1edf280|github.com/rancher/terraform-provider-rancher2/rancher2.resourceRancher2BootstrapCreate(0x1edf280>?, {0x2221660?, 0xc000474180})
/go/src/github.com/rancher/terraform-provider-rancher2/rancher2/resource_rancher2_bootstrap.go:27 +0x70
<http://github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc000423040|github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc000423040>, 0xc0010ce460, 0xc0010d4260, {0x2221660, 0xc000474180})
/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.17.2/helper/schema/resource.go:320 +0x438
<http://github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc00042a000|github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc00042a000>, 0xc000b1f8d0, 0x224f874?, 0xf?)
/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.17.2/helper/schema/provider.go:294 +0x70
<http://github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc00011c868|github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc00011c868>, {0xc0010d8070?, 0x4bffa6?}, 0xc0010d8070)
/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/helper/plugin/grpc_provider.go:895 +0x805
<http://github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x2156980|github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x2156980>?, 0xc00011c868}, {0x279c2b0, 0xc0010ca1b0}, 0xc0010d8000, 0x0)
/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/tfplugin5/tfplugin5.pb.go:3305 +0x170
<http://google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002a01e0|google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002a01e0>, {0x27a5f00, 0xc0007024e0}, 0xc00033b320, 0xc00062ae40, 0x3949e00, 0x0)
/go/pkg/mod/google.golang.org/grpc@v1.53.0/server.go:1336 +0xd23
<http://google.golang.org/grpc.(*Server).handleStream(0xc0002a01e0|google.golang.org/grpc.(*Server).handleStream(0xc0002a01e0>, {0x27a5f00, 0xc0007024e0}, 0xc00033b320, 0x0)
/go/pkg/mod/google.golang.org/grpc@v1.53.0/server.go:1704 +0xa2f
<http://google.golang.org/grpc.(*Server).serveStreams.func1.2()|google.golang.org/grpc.(*Server).serveStreams.func1.2()>
/go/pkg/mod/google.golang.org/grpc@v1.53.0/server.go:965 +0x98
created by <http://google.golang.org/grpc.(*Server).serveStreams.func1|google.golang.org/grpc.(*Server).serveStreams.func1>
/go/pkg/mod/google.golang.org/grpc@v1.53.0/server.go:963 +0x28a
Error: The terraform-provider-rancher2_v3.1.1 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.