incident-io / terraform-provider-incident

This project is the official terraform provider for incident.io.
https://registry.terraform.io/providers/incident-io/incident/latest
MIT License
9 stars 5 forks source link

incident_escalation_path fails to import #88

Open nismotie opened 3 months ago

nismotie commented 3 months ago

I have tried to import an escalation path by taking the ULID that comes after app.incident.io//on-call/escalation-paths/

I then try to import the escalation path into a resource in my local TF state with tf import incident_escalation_path.test_escalation 01J1XXXXXXXXXXX

This results in the following stack trace:

╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).ReadResource call. The
│ plugin logs may contain more details.
╵

╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).ReadDataSource call. The
│ plugin logs may contain more details.
╵

╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).ReadDataSource call. The
│ plugin logs may contain more details.
╵

╷
 Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).ReadDataSource call. The
│ plugin logs may contain more details.
╵

╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).ReadDataSource call. The
│ plugin logs may contain more details.
╵

╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).ReadDataSource call. The
│ plugin logs may contain more details.
╵

╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).ReadDataSource call. The
│ plugin logs may contain more details.
╵

Stack trace from the terraform-provider-incident_v3.7.0 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10122a070]

goroutine 29 [running]:
github.com/incident-io/terraform-provider-incident/internal/provider.(*IncidentEscalationPathResource).Read(0x1400062e010, {0x10155ab00, 0x14000e12c00}, {{{{0x10155eee8, 0x14000e9f170}, {0x10143a6e0, 0x14000e95380}}, {0x1015606e8, 0x14000dacc30}}, 0x1400062e028, ...}, ...)
        github.com/incident-io/terraform-provider-incident/internal/provider/incident_escalation_path_resource.go:275 +0x330
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ReadResource(0x1400019a160, {0x10155ab00, 0x14000e12c00}, 0x14000e12c30, 0x14000647620)
        github.com/hashicorp/terraform-plugin-framework@v1.2.0/internal/fwserver/server_readresource.go:97 +0x500
github.com/hashicorp/terraform-plugin-framework/internal/proto6server.(*Server).ReadResource(0x1400019a160, {0x10155ab00?, 0x14000e12ab0?}, 0x14000130640)
        github.com/hashicorp/terraform-plugin-framework@v1.2.0/internal/proto6server/server_readresource.go:52 +0x314
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ReadResource(0x140002b43c0, {0x10155ab00?, 0x14000e12000?}, 0x1400004cea0)
        github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov6/tf6server/server.go:746 +0x3e8
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ReadResource_Handler({0x10151e880?, 0x140002b43c0}, {0x10155ab00, 0x14000e12000}, 0x1400009a0e0, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:383 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0x14000d3c000, {0x10155f1d8, 0x140007dfba0}, 0x1400089a360, 0x140006abf50, 0x101b880d0, 0x0)
        google.golang.org/grpc@v1.54.0/server.go:1345 +0xc90
google.golang.org/grpc.(*Server).handleStream(0x14000d3c000, {0x10155f1d8, 0x140007dfba0}, 0x1400089a360, 0x0)
        google.golang.org/grpc@v1.54.0/server.go:1722 +0x82c
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/grpc@v1.54.0/server.go:966 +0x84
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/grpc@v1.54.0/server.go:964 +0x28c

Error: The terraform-provider-incident_v3.7.0 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.

I am using

Any help would be greatly appreciated

leonore commented 8 hours ago

Hi @nismotie! Sorry for the delay it's taken for us to get back to you.

I haven't been able to reproduce this on my side, would I be able to ask you:

This will make it easier for us to debug what might be happening here - thank you for your patience 🙏