-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGSEGV in cloudflare_tunnel_config: nil pointer dereference #2487
Comments
Terraform debug log detected ✅ |
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
If it's helpful, here's a similar configuration:
|
Yep, happens to me as well when updating the tunnel config resource. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I can still reproduce this issue with v4.8.0:
|
Seems to be introducedin 74b7b26 it references It's pretty likely the other It was introduced in v4.7.0 cc: @Cyb3r-Jak3 |
Yeah, any field with that is a |
Oh nice, you already made a fix 🎉 too bad its been hanging for a couple of weeks - anything I can help to support it getting merged in? :) |
This functionality has been released in v4.9.0 of the Terraform Cloudflare Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Confirmation
Terraform and Cloudflare provider version
Terraform v1.4.6
on linux_amd64
Affected resource(s)
Terraform configuration files
Link to debug output
https://gist.github.com/Bakus/9619aed6bfced259c7d4dc84f61f5ffa
Panic output
Stack trace from the terraform-provider-cloudflare_v4.7.1 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb3b149]
goroutine 523 [running]:
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider.parseOriginRequest({0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0007d203a, ...})
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider/resource_cloudflare_tunnel_config.go:122 +0x49
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider.resourceCloudflareTunnelConfigRead({0x11bc860, 0xc0006bb4a0}, 0xc000138700, {0xffbde0?, 0xc00052a000})
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider/resource_cloudflare_tunnel_config.go:233 +0xc58
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider.resourceCloudflareTunnelConfigImport({0x11bc860, 0xc0006bb4a0}, 0xc000138700, {0xffbde0?, 0xc00052a000?})
github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider/resource_cloudflare_tunnel_config.go:297 +0x4f6
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Provider).ImportState(0xc0000910e0, {0x11bc860, 0xc0006bb4a0}, 0xc00010f390, {0xc0005f60a0, 0x41})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/provider.go:385 +0x1ac
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ImportResourceState(0xc0000112c0, {0x11bc860?, 0xc00049dd40?}, 0xc0005fc220)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1088 +0xf4
github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.ImportResourceState({{0x11c25f0?, 0xc0000112c0?}}, {0x11bc860?, 0xc00049dd40?}, 0xc0005fc200?)
github.com/hashicorp/[email protected]/tf5to6server/tf5to6server.go:67 +0xd0
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.muxServer.ImportResourceState({0xc0003acba0, 0xc0003acc00, {0xc0004311a0, 0x2, 0x2}, {0x0, 0x0, 0x0}, {0x0, 0x0, ...}, ...}, ...)
github.com/hashicorp/[email protected]/tf6muxserver/mux_server_ImportResourceState.go:27 +0x102
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ImportResourceState(0xc0004f9220, {0x11bc860?, 0xc00049ccc0?}, 0xc00087a730)
github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:846 +0x1f6
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ImportResourceState_Handler({0xfcc460?, 0xc0004f9220}, {0x11bc860, 0xc00049ccc0}, 0xc00019e070, 0x0)
github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:437 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0004f05a0, {0x11c1578, 0xc000500680}, 0xc0006bed80, 0xc0003e88a0, 0x17c1458, 0x0)
google.golang.org/[email protected]/server.go:1345 +0xdf3
google.golang.org/grpc.(*Server).handleStream(0xc0004f05a0, {0x11c1578, 0xc000500680}, 0xc0006bed80, 0x0)
google.golang.org/[email protected]/server.go:1722 +0xa36
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/[email protected]/server.go:966 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:964 +0x28a
Error: The terraform-provider-cloudflare_v4.7.1 plugin crashed!
Expected output
Working import and update of cloudflare_tunnel_config
Actual output
panic from GO
Steps to reproduce
TF_LOG=TRACE TF_LOG_PATH=./tf-471-import.log terraform import cloudflare_tunnel_config.fi-vm-1 cd92ce0a01c0f5c705c792b83b120a8b/bfbd542b83a3428b84d69996d003c13a
or do anything with cloudflare_tunnel_config
Additional factoids
terraform-provider-cloudflare/internal/sdkv2provider/resource_cloudflare_tunnel_config.go
Line 120 in 122b6fb
2023-05-31T14:20:50.945+0200 [DEBUG] provider.terraform-provider-cloudflare_v4.7.1: GetTunnelConfiguration: {TunnelID:bfbd542b-83a3-428b-84d6-9996d003c13a Config:{Ingress:[{Hostname:adm-proxmox.tensquaregames.team Path: Service:https://10.18.4.1:8006 OriginRequest:0xc0004f8320} {Hostname: Path: Service:http_status:501 OriginRequest:<nil>}] WarpRouting:0xc0007d203b OriginRequest:{ConnectTimeout:<nil> TLSTimeout:<nil> TCPKeepAlive:<nil> NoHappyEyeballs:<nil> KeepAliveConnections:<nil> KeepAliveTimeout:<nil> HTTPHostHeader:<nil> OriginServerName:<nil> CAPool:<nil> NoTLSVerify:<nil> DisableChunkedEncoding:<nil> BastionMode:<nil> ProxyAddress:<nil> ProxyPort:<nil> ProxyType:<nil> IPRules:[] Http2Origin:<nil> Access:<nil>}} Version:26}: tf_rpc=ImportResourceState @module=cloudflare tf_mux_provider=tf5to6server.v5tov6Server tf_req_id=b2a37622-47b9-fce2-c7ec-3b54172d94f5 tf_resource_type=cloudflare_tunnel_config @caller=github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider/resource_cloudflare_tunnel_config.go:192 tf_provider_addr=registry.terraform.io/cloudflare/cloudflare timestamp=2023-05-31T14:20:50.945+0200
References
No response
The text was updated successfully, but these errors were encountered: