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

importing existing secret file crashes the provider #225

Open
xyhhx opened this issue Dec 29, 2024 · 0 comments
Open

importing existing secret file crashes the provider #225

xyhhx opened this issue Dec 29, 2024 · 0 comments
Assignees

Comments

@xyhhx
Copy link

xyhhx commented Dec 29, 2024

i am trying to import an existing secrets file. when i try, i get a panic from a nil pointer dereference:

command output
Stack trace from the terraform-provider-talos_v0.7.0 plugin:

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

goroutine 14 [running]:
github.com/siderolabs/terraform-provider-talos/pkg/talos.secretsBundleTomachineSecrets(_)
        github.com/siderolabs/terraform-provider-talos/pkg/talos/util.go:158 +0x282
github.com/siderolabs/terraform-provider-talos/pkg/talos.(*talosMachineSecretsResource).ImportState(0x2e486a8?, {0x2e486a8, 0xc00062db00}, {{0xc0006b2fa0?, 0x2a960d1?}, {0x2d?}}, 0xc0000b1320)
        github.com/siderolabs/terraform-provider-talos/pkg/talos/talos_machine_secrets_resource.go:621 +0x12f
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ImportResourceState(0xc00060a008, {0x2e486a8, 0xc00062db00}, 0xc0002f4540, 0xc00074d5f8)
        github.com/hashicorp/[email protected]/internal/fwserver/server_importresourcestate.go:136 +0x7ec
github.com/hashicorp/terraform-plugin-framework/internal/proto6server.(*Server).ImportResourceState(0xc00060a008, {0x2e486a8?, 0xc00062da10?}, 0xc00062d9b0)
        github.com/hashicorp/[email protected]/internal/proto6server/server_importresourcestate.go:47 +0x2a5
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ImportResourceState(0xc0006180a0, {0x2e486a8?, 0xc00062d080?}, 0xc0005fc500)
        github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:896 +0x24d
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ImportResourceState_Handler({0x29a06e0, 0xc0006180a0}, {0x2e486a8, 0xc00062d080}, 0xc000320580, 0x0)
        github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:629 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002c6000, {0x2e486a8, 0xc00062cff0}, {0x2e5ddc0, 0xc000398d00}, 0xc0002d3d40, 0xc00062cd80, 0x46b5230, 0x0)
        google.golang.org/[email protected]/server.go:1394 +0xe2b
google.golang.org/grpc.(*Server).handleStream(0xc0002c6000, {0x2e5ddc0, 0xc000398d00}, 0xc0002d3d40)
        google.golang.org/[email protected]/server.go:1805 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/[email protected]/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 22
        google.golang.org/[email protected]/server.go:1040 +0x125

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

probably relevant is that my cluster secrets file's aescbc_encryption_secret is null. i don't know why that is, that file was generated by the talos provider, albeit an older version

regarding the null value for aescbc_encryption_secret, can i update it with a new value? if not, what should i do?

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

No branches or pull requests

2 participants