-
Notifications
You must be signed in to change notification settings - Fork 62
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
invalid memory address or nil pointer dereference #112
Comments
Hi @DragosV29 can you please provide more detailed steps to reproduce this? |
Hello, Create a rundeck project through terraform code resource "rundeck_project" "lab" {
} I've also created the machine as part of it but that is not important. Create the rundeck keys through terraform: resource "rundeck_public_key" "lab_unix" { resource "rundeck_private_key" "lab_unix" { the key takes as refference a tls_private_key resource resource "tls_private_key" "lab_key" { Additionaly you can have a basic job but I do not think that would make any difference resource "rundeck_job" "basic_lab" { schedule = "0 00 10 ? * 1-5 *" command { } Once all these have been provisioned go to rundeck gui and remove the key manually then run another plan/apply Let me know if you are able to reproduce the issue or if any additional code is needed. |
I think the expectation is that changes aren't made outside of Terraform. Deleting the key manually creates a situation where the Terraform State is different from the actual state. I'll defer to more experienced Terraform users if that's normal or not, but I do get an error in that scenario. |
Hi,
I have the following issue when running from terraform. The issue happens if you update some resources like keys or project through GUI after creating them in terraform. Once you do that the below error will occur. Expected behaviour would be to state that there have been changes or that the resource no longer exists and needs to be recreated
│ Error: Plugin did not respond
│
│ with module.rundeck_lab["testing"].rundeck_project.lab[0],
│ on ../../modules/rundeck_lab/rundeck_unix.tf line 1, in resource "rundeck_project" "lab":
│ 1: resource "rundeck_project" "lab" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).UpgradeResourceState call. The plugin logs may contain more details.
╵
╷
│ Error: Plugin did not respond
│
│ with module.rundeck_lab["testing"].rundeck_public_key.lab_unix[0],
│ on ../../modules/rundeck_lab/rundeck_unix.tf line 266, in resource "rundeck_public_key" "lab_unix":
│ 266: resource "rundeck_public_key" "lab_unix" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵
╷
│ Error: Plugin did not respond
│
│ with module.rundeck_lab["testing"].rundeck_acl_policy.lab[0],
│ on ../../modules/rundeck_lab/rundeck_unix.tf line 278, in resource "rundeck_acl_policy" "lab":
│ 278: resource "rundeck_acl_policy" "lab" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵
╷
│ Error: Plugin did not respond
│
│ with module.rundeck_lab["testing"].rundeck_private_key.windows_lab[0],
│ on ../../modules/rundeck_lab/rundeck_windows.tf line 127, in resource "rundeck_private_key" "windows_lab":
│ 127: resource "rundeck_private_key" "windows_lab" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵
╷
│ Error: Plugin did not respond
│
│ with module.rundeck_lab["testing"].rundeck_acl_policy.windows_lab[0],
│ on ../../modules/rundeck_lab/rundeck_windows.tf line 133, in resource "rundeck_acl_policy" "windows_lab":
│ 133: resource "rundeck_acl_policy" "windows_lab" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵
Stack trace from the terraform-provider-rundeck_v0.4.6 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xc257f2]
goroutine 73 [running]:
github.com/terraform-providers/terraform-provider-rundeck/rundeck.PrivateKeyExists(0xc00052fc20?, {0xde1280?, 0xc000435440})
github.com/terraform-providers/terraform-provider-rundeck/rundeck/resource_private_key.go:122 +0x1f2
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc00053a600, 0xc00021c190, {0xde1280, 0xc000435440})
github.com/hashicorp/[email protected]/helper/schema/resource.go:440 +0x131
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc000012a98, {0xc00021c0a0?, 0x4b9f06?}, 0xc00021c0a0)
github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:525 +0x365
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler({0xdb8480?, 0xc000012a98}, {0xf73790, 0xc000270180}, 0xc0005ae600, 0x0)
github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3153 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00042c480, {0xf77880, 0xc000172000}, 0xc00001e000, 0xc000203650, 0x14c1e90, 0x0)
google.golang.org/[email protected]/server.go:995 +0xe1e
google.golang.org/grpc.(*Server).handleStream(0xc00042c480, {0xf77880, 0xc000172000}, 0xc00001e000, 0x0)
google.golang.org/[email protected]/server.go:1275 +0xa16
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/[email protected]/server.go:710 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:708 +0xea
Error: The terraform-provider-rundeck_v0.4.6 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.
The text was updated successfully, but these errors were encountered: