Stack trace from the terraform-provider-better-uptime_v0.19.0.exe plugin:
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 82 [running]:
github.com/BetterStackHQ/terraform-provider-better-uptime/internal/provider.loadRequestHeaders(0xc000692e00, 0xc000208240)
github.com/BetterStackHQ/terraform-provider-better-uptime/internal/provider/resource_monitor.go:640 +0xb97
github.com/BetterStackHQ/terraform-provider-better-uptime/internal/provider.monitorCreate({0x12277c8, 0xc0001e9110}, 0xc000692e00, {0x102ac60, 0xc00013c300})
github.com/BetterStackHQ/terraform-provider-better-uptime/internal/provider/resource_monitor.go:534 +0xf4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc000331100, {0x1227720, 0xc00037cf00}, 0xc000692e00, {0x102ac60, 0xc00013c300})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.36.1/helper/schema/resource.go:838 +0x119
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000331100, {0x1227720, 0xc00037cf00}, 0xc000691ba0, 0xc000692b00, {0x102ac60, 0xc00013c300})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.36.1/helper/schema/resource.go:969 +0xa69
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00040c5a0, {0x1227720?, 0xc00037ce40?}, 0xc0001ad3b0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.36.1/helper/schema/grpc_provider.go:1188 +0xd5c
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0002ff5e0, {0x1227720?, 0xc00037c390?}, 0xc0001e8af0)
github.com/hashicorp/terraform-plugin-go@v0.26.0/tfprotov5/tf5server/server.go:866 +0x3bc
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x10c0780, 0xc0002ff5e0}, {0x1227720, 0xc00037c390}, 0xc000692280, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.26.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:611 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002b2200, {0x1227720, 0xc00037c330}, 0xc0000b2360, 0xc00037de90, 0x17d9878, 0x0)
google.golang.org/grpc@v1.69.4/server.go:1392 +0xfc3
google.golang.org/grpc.(*Server).handleStream(0xc0002b2200, {0x1227f28, 0xc000502000}, 0xc0000b2360)
google.golang.org/grpc@v1.69.4/server.go:1802 +0xbaa
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.69.4/server.go:1030 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 21
google.golang.org/grpc@v1.69.4/server.go:1041 +0x125
Error: The terraform-provider-better-uptime_v0.19.0.exe 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.
exit status 1
Even though this is clearly the wrong value, I think it would be better if this was caught during validation and result in a meaningful error message instead of a crash with a golang stack trace.
When a monitor resource has an empty map in the
request_headerslist, the provider plugin crashes.Example code:
the minimal value triggering the crash is:
request_headers = [{}]The error shown is:
Even though this is clearly the wrong value, I think it would be better if this was caught during validation and result in a meaningful error message instead of a crash with a golang stack trace.