cloudflare_teams_location fails to import default location #4846
Labels
kind/bug
Categorizes issue or PR as related to a bug.
triage/needs-information
Indicates an issue needs more information in order to work on it.
Milestone
Confirmation
Terraform and Cloudflare provider version
Terraform v1.7.4
on darwin_arm64
Affected resource(s)
cloudflare_teams_location
Terraform configuration files
Link to debug output
no
Panic output
Stack trace from the terraform-provider-cloudflare_v4.50.0 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10528e9a0]
goroutine 145 [running]:
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider.flattenTeamsEndpoints(0x0)
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider/resource_cloudflare_teams_location.go:390 +0x30
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider.resourceCloudflareTeamsLocationRead({0x106153a48, 0x140008484e0}, 0x1400050cc80, {0x106131140?, 0x1400056c000})
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider/resource_cloudflare_teams_location.go:101 +0xe34
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider.resourceCloudflareTeamsLocationImport({0x106153a48, 0x140008484e0}, 0x1400050cc80, {0x106131140, 0x1400056c000})
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider/resource_cloudflare_teams_location.go:203 +0x2dc
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Provider).ImportState(0x140005c8000, {0x106153a48, 0x140008484e0}, 0x140002d5478, {0x14000716280, 0x41})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/provider.go:475 +0x128
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ImportResourceState(0x14000598030, {0x106153a48?, 0x140008483f0?}, 0x14000848450)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1267 +0x4f0
github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.ImportResourceState({{0x106165720?, 0x14000598030?}}, {0x106153a48?, 0x140008483f0?}, 0x140008480c0?)
github.com/hashicorp/[email protected]/tf5to6server/tf5to6server.go:133 +0x124
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.(*muxServer).ImportResourceState(0x140005ca000, {0x106153a48?, 0x14000848120?}, 0x140008480c0)
github.com/hashicorp/[email protected]/tf6muxserver/mux_server_ImportResourceState.go:36 +0x184
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ImportResourceState(0x1400047a140, {0x106153a48?, 0x140007e7710?}, 0x140003c18b0)
github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:896 +0x1dc
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ImportResourceState_Handler({0x1060d45e0, 0x1400047a140}, {0x106153a48, 0x140007e7710}, 0x1400050c900, 0x0)
github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:629 +0x1c0
google.golang.org/grpc.(*Server).processUnaryRPC(0x1400019ec00, {0x106153a48, 0x140007e7680}, {0x10615d2c0, 0x140005aa1a0}, 0x140009f79e0, 0x1400011eab0, 0x106f8c050, 0x0)
google.golang.org/[email protected]/server.go:1394 +0xb64
google.golang.org/grpc.(*Server).handleStream(0x1400019ec00, {0x10615d2c0, 0x140005aa1a0}, 0x140009f79e0)
google.golang.org/[email protected]/server.go:1805 +0xb20
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1029 +0x84
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 30
google.golang.org/[email protected]/server.go:1040 +0x13c
Expected output
I expected the resource being imported
Actual output
panic
Steps to reproduce
terraform import cloudflare_teams_location.default /
Additional factoids
I haven't tested for other locations
References
No response
The text was updated successfully, but these errors were encountered: