Skip to content
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

Fix type conversion on ID when updating tunnel termination #616

Merged

Conversation

mraerino
Copy link
Contributor

@mraerino mraerino commented Jul 7, 2024

Fixes this crash that i was able to reproduce in a regression test:

=== CONT  TestAccNetboxVpnTunnelTermination_basic
panic: interface conversion: interface {} is int, not int64

goroutine 1944 [running]:
github.com/e-breuninger/terraform-provider-netbox/netbox.resourceNetboxVpnTunnelTerminationUpdate(0x14000894c00, {0x105c46d60, 0x14000023290})
        /Users/marcus/src/ffddorf/terraform-provider-netbox/netbox/resource_netbox_vpn_tunnel_termination.go:143 +0x434
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0x105f73320?, {0x105f73320?, 0x14000a80f30?}, 0xd?, {0x105c46d60?, 0x14000023290?})
        /Users/marcus/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:828 +0x130
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x1400027b0a0, {0x105f73320, 0x14000a80f30}, 0x1400093de10, 0x14000894a80, {0x105c46d60, 0x14000023290})
        /Users/marcus/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:947 +0x670
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x140006a0000, {0x105f73320?, 0x14000a80ea0?}, 0x1400090d1d0)
        /Users/marcus/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1153 +0xaa4
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x140004c8500, {0x105f73320?, 0x14000a80690?}, 0x14000356620)
        /Users/marcus/go/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:865 +0x2b4
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x105e96660, 0x140004c8500}, {0x105f73320, 0x14000a80690}, 0x14000894680, 0x0)
        /Users/marcus/go/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x1c0
google.golang.org/grpc.(*Server).processUnaryRPC(0x14000452200, {0x105f73320, 0x14000a80600}, {0x105f79380, 0x14000970480}, 0x1400075f7a0, 0x140008189f0, 0x10700dbb8, 0x0)
        /Users/marcus/go/pkg/mod/google.golang.org/[email protected]/server.go:1369 +0xb58
google.golang.org/grpc.(*Server).handleStream(0x14000452200, {0x105f79380, 0x14000970480}, 0x1400075f7a0)
        /Users/marcus/go/pkg/mod/google.golang.org/[email protected]/server.go:1780 +0xb20
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        /Users/marcus/go/pkg/mod/google.golang.org/[email protected]/server.go:1019 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 1832
        /Users/marcus/go/pkg/mod/google.golang.org/[email protected]/server.go:1030 +0x13c
FAIL    github.com/e-breuninger/terraform-provider-netbox/netbox        5.509s
FAIL

mraerino added a commit to ffddorf/terraform-gre-sites that referenced this pull request Jul 7, 2024
@mraerino mraerino changed the title Fix type conversion on ID in tunnel termination Fix type conversion on ID when updating tunnel termination Jul 7, 2024
@fbreckle fbreckle merged commit 3810615 into e-breuninger:master Jul 10, 2024
14 checks passed
@mraerino mraerino deleted the fix/tunnel-id-in-termination-update branch July 12, 2024 18:23
mraerino added a commit to ffddorf/terraform-gre-sites that referenced this pull request Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants