PagerDuty / terraform-provider-pagerduty

Terraform PagerDuty provider
https://www.terraform.io/docs/providers/pagerduty/
Mozilla Public License 2.0
204 stars 208 forks source link

Pagerduty Provider Plugin Crashed #853

Closed defiant214 closed 2 months ago

defiant214 commented 2 months ago

Plugin v3.11.2 still crashing. Reference Issue #844

The issue is still not fixed in v.3.11.2: Stack trace from the terraform-provider-pagerduty_v3.11.2 plugin:

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 119 [running]: github.com/PagerDuty/terraform-provider-pagerduty/pagerduty.expandScheduledActionAt(...) github.com/PagerDuty/terraform-provider-pagerduty/pagerduty/resource_pagerduty_service.go:895 github.com/PagerDuty/terraform-provider-pagerduty/pagerduty.expandScheduledActions(...) github.com/PagerDuty/terraform-provider-pagerduty/pagerduty/resource_pagerduty_service.go:870 github.com/PagerDuty/terraform-provider-pagerduty/pagerduty.buildServiceStruct(0xc0003923c0?) github.com/PagerDuty/terraform-provider-pagerduty/pagerduty/resource_pagerduty_service.go:446 +0xe57 github.com/PagerDuty/terraform-provider-pagerduty/pagerduty.resourcePagerDutyServiceUpdate(0xc000633180, {0xf8c460?, 0xc0003923c0?}) github.com/PagerDuty/terraform-provider-pagerduty/pagerduty/resource_pagerduty_service.go:529 +0x58 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).update(0x1375d40?, {0x1375d40?, 0xc00078a060?}, 0xd?, {0xf8c460?, 0xc0003923c0?}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.31.0/helper/schema/resource.go:800 +0x178 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).Apply(0xc000358e00, {0x1375d40, 0xc00078a060}, 0xc0006bd450, 0xc000632f80, {0xf8c460, 0xc0003923c0}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.31.0/helper/schema/resource.go:919 +0x845 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ApplyResourceChange(0xc00012f980, {0x1375d40?, 0xc0006f9bf0?}, 0xc000614640) github.com/hashicorp/terraform-plugin-sdk/v2@v2.31.0/helper/schema/grpc_provider.go:1074 +0xe8d github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(muxServer).ApplyResourceChange(0x1375c98?, {0x1375d40?, 0xc0006f8ea0?}, 0xc000614640) github.com/hashicorp/terraform-plugin-mux@v0.13.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x1b5 github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ApplyResourceChange(0xc0003921e0, {0x1375d40?, 0xc0006f84b0?}, 0xc0002080e0) github.com/hashicorp/terraform-plugin-go@v0.20.0/tfprotov5/tf5server/server.go:859 +0x574 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x10a4bc0?, 0xc0003921e0}, {0x1375d40, 0xc0006f84b0}, 0xc000632780, 0x0) github.com/hashicorp/terraform-plugin-go@v0.20.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:503 +0x170 google.golang.org/grpc.(Server).processUnaryRPC(0xc0001c7000, {0x1375d40, 0xc0006f8210}, {0x137b138, 0xc0000076c0}, 0xc0006e7200, 0xc00043e120, 0x1a3ce38, 0x0) google.golang.org/grpc@v1.60.1/server.go:1372 +0xe49 google.golang.org/grpc.(Server).handleStream(0xc0001c7000, {0x137b138, 0xc0000076c0}, 0xc0006e7200) google.golang.org/grpc@v1.60.1/server.go:1783 +0x1031 google.golang.org/grpc.(Server).serveStreams.func2.1() google.golang.org/grpc@v1.60.1/server.go:1016 +0x68 created by google.golang.org/grpc.(*Server).serveStreams.func2 google.golang.org/grpc@v1.60.1/server.go:1027 +0x12e

Error: The terraform-provider-pagerduty_v3.11.2 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.

imjaroiswebdev commented 2 months ago

@defiant214 Please upgrade to PagerDuty Terraform provider v3.11.3 or newer to stop facing this issue. Now all nil pointer conversions should be handled. Thanks for your patience and feedback.