Closed sco-at-scg closed 9 months ago
similar issue, apparently it crashes when the existing destination has non-empty "actions"
Thanks for raising our first issue! It should be fixed now 🙂
With the latest commit ff7bc07
, the issue is still persisting, i.e.: for the destination: Google Analytics 4
goroutine 274 [running]:
github.com/segmentio/terraform-provider-segment/internal/provider/models.(*DestinationMetadataState).getContacts(0x0?, {0x140003d2780?, 0x1, 0x14000902230?})
/tmp/dl/dev/github.com/segmentio/terraform-provider-segment/internal/provider/models/destination_metadata.go:240 +0x9c
github.com/segmentio/terraform-provider-segment/internal/provider/models.(*DestinationMetadataState).Fill(_, {{0x1400069acf0, 0x18}, {0x1400069ad50, 0x16}, {0x14000912780, 0x264}, {0x140007440c0, 0x1e}, {{0x14000780000, ...}, ...}, ...})
/tmp/dl/dev/github.com/segmentio/terraform-provider-segment/internal/provider/models/destination_metadata.go:412 +0x334
github.com/segmentio/terraform-provider-segment/internal/provider/models.(*DestinationState).Fill(0x14000748070, 0x1400091f050)
/tmp/dl/dev/github.com/segmentio/terraform-provider-segment/internal/provider/models/destination.go:31 +0x8c
github.com/segmentio/terraform-provider-segment/internal/provider.(*destinationResource).Read(0x14000702288, {0x1011d8ea8, 0x14000464f00}, {{{{0x1011dd430, 0x140007996b0}, {0x10109afc0, 0x14000799050}}, {0x1011e0168, 0x140000b8320}}, 0x14000088760, ...}, ...)
/tmp/dl/dev/github.com/segmentio/terraform-provider-segment/internal/provider/destination_resource.go:600 +0x2e8
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ReadResource(0x1400018f080, {0x1011d8ea8, 0x14000464f00}, 0x14000464f90, 0x1400091f630)
/tmp/go/pkg/mod/github.com/hashicorp/terraform-plugin-framework@v1.4.1/internal/fwserver/server_readresource.go:101 +0x514
github.com/hashicorp/terraform-plugin-framework/internal/proto6server.(*Server).ReadResource(0x1400018f080, {0x1011d8ea8?, 0x14000464d80?}, 0x14000585000)
/tmp/go/pkg/mod/github.com/hashicorp/terraform-plugin-framework@v1.4.1/internal/proto6server/server_readresource.go:55 +0x314
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ReadResource(0x140001f0780, {0x1011d8ea8?, 0x14000464510?}, 0x140004b24e0)
/tmp/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov6/tf6server/server.go:787 +0x390
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ReadResource_Handler({0x101198060?, 0x140001f0780}, {0x1011d8ea8, 0x14000464510}, 0x140001d41c0, 0x0)
/tmp/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:431 +0x164
google.golang.org/grpc.(*Server).processUnaryRPC(0x140001e81e0, {0x1011de998, 0x1400033a1a0}, 0x1400021d0e0, 0x1400032a0f0, 0x1017e9848, 0x0)
/tmp/go/pkg/mod/google.golang.org/grpc@v1.57.0/server.go:1360 +0xc04
google.golang.org/grpc.(*Server).handleStream(0x140001e81e0, {0x1011de998, 0x1400033a1a0}, 0x1400021d0e0, 0x0)
/tmp/go/pkg/mod/google.golang.org/grpc@v1.57.0/server.go:1737 +0x7c4
google.golang.org/grpc.(*Server).serveStreams.func1.1()
/tmp/go/pkg/mod/google.golang.org/grpc@v1.57.0/server.go:982 +0x84
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 13
/tmp/go/pkg/mod/google.golang.org/grpc@v1.57.0/server.go:980 +0x154
Error: The terraform-provider-segment.v0.1.0 plugin crashed!
Description
Crash when creating a resource from import block
To Reproduce