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

terraform vsphere destroy failing with error #2305

Open
4 tasks done
sivakumarvaddi786 opened this issue Dec 4, 2024 · 2 comments
Open
4 tasks done

terraform vsphere destroy failing with error #2305

sivakumarvaddi786 opened this issue Dec 4, 2024 · 2 comments
Assignees
Labels
bug Type: Bug crash Impact: Crash needs-triage Status: Issue Needs Triage
Milestone

Comments

@sivakumarvaddi786
Copy link

sivakumarvaddi786 commented Dec 4, 2024

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform

v1.10.0

Terraform Provider

v2.10.0

VMware vSphere

8.0.3.00000

Description

module crashing at snapshot handle step
with module.snapvmtemplate.vsphere_virtual_machine.snap_to_vm
on .terraform/modules/snapvmtemplate/main.tf line 12, in resource "vsphere_virtual_machine" "snap_to_vm":

Affected Resources or Data Sources

with module.snapvmtemplate.vsphere_virtual_machine.snap_to_vm
on .terraform/modules/snapvmtemplate/main.tf line 12, in resource "vsphere_virtual_machine" "snap_to_vm":

Stack trace from the terraform-provider-vsphere_v2.10.0_x5 plugin:

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

goroutine 93 [running]:
github.com/hashicorp/terraform-provider-vsphere/vsphere.resourceVSphereVirtualMachineRead(0xc00039d880, {0x1290a00, 0xc00048f890})
github.com/hashicorp/terraform-provider-vsphere/vsphere/resource_vsphere_virtual_machine.go:469 +0x6d6
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x17ec528?, {0x17ec528?, 0xc000487470?}, 0xd?, {0x1290a00?, 0xc00048f890?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:811 +0x15f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0001f9ea0, {0x17ec528, 0xc000487470}, 0xc00048d930, {0x1290a00, 0xc00048f890})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1117 +0x529
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000177c08, {0x17ec528?, 0xc0004873b0?}, 0xc0006f3640)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:708 +0x6c5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc00038a780, {0x17ec528?, 0xc000486bd0?}, 0xc0003a7a40)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:783 +0x309
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x1589f40, 0xc00038a780}, {0x17ec528, 0xc000486bd0}, 0xc00014fc80, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00014b000, {0x17ec528, 0xc000486b40}, {0x17f13e0, 0xc0001d8780}, 0xc000641d40, 0xc000167b60, 0x229e228, 0x0)
google.golang.org/[email protected]/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc00014b000, {0x17f13e0, 0xc0001d8780}, 0xc000641d40)
google.golang.org/[email protected]/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 12
google.golang.org/[email protected]/server.go:1030 +0x125

Error: The terraform-provider-vsphere_v2.10.0_x5 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.

Terraform Configuration

resource "vsphere_virtual_machine_snapshot" "vm_snapshot" {
  virtual_machine_uuid = data.vsphere_virtual_machine.reference_vm.uuid
  snapshot_name        = var.snapshot_name
  description          = "This is Demo Snapshot"
  memory               = "true"
  quiesce              = "true"
  remove_children      = "false"
  consolidate          = "true"
}

Debug Output

Stack trace from the terraform-provider-vsphere_v2.10.0_x5 plugin:

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

goroutine 105 [running]:
github.com/hashicorp/terraform-provider-vsphere/vsphere.resourceVSphereVirtualMachineRead(0xc00039d080, {0x1290a00, 0xc000469ef0})
github.com/hashicorp/terraform-provider-vsphere/vsphere/resource_vsphere_virtual_machine.go:469 +0x6d6
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x17ec528?, {0x17ec528?, 0xc0002e4570?}, 0xd?, {0x1290a00?, 0xc000469ef0?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:811 +0x15f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000217ea0, {0x17ec528, 0xc0002e4570}, 0xc0000b2dd0, {0x1290a00, 0xc000469ef0})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1117 +0x529
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc0001afc08, {0x17ec528?, 0xc0002e44b0?}, 0xc000401cc0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:708 +0x6c5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc00038a780, {0x17ec528?, 0xc000aafbf0?}, 0xc0003a7b20)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:783 +0x309
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x1589f40, 0xc00038a780}, {0x17ec528, 0xc000aafbf0}, 0xc00039c100, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000149000, {0x17ec528, 0xc000aafb60}, {0x17f13e0, 0xc0001d8780}, 0xc0008d8000, 0xc000255440, 0x229e228, 0x0)
google.golang.org/[email protected]/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc000149000, {0x17f13e0, 0xc0001d8780}, 0xc0008d8000)
google.golang.org/[email protected]/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 16
google.golang.org/[email protected]/server.go:1030 +0x125

Error: The terraform-provider-vsphere_v2.10.0_x5 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.

Panic Output

Stack trace from the terraform-provider-vsphere_v2.10.0_x5 plugin:

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

goroutine 93 [running]:
github.com/hashicorp/terraform-provider-vsphere/vsphere.resourceVSphereVirtualMachineRead(0xc00039d880, {0x1290a00, 0xc00048f890})
github.com/hashicorp/terraform-provider-vsphere/vsphere/resource_vsphere_virtual_machine.go:469 +0x6d6
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x17ec528?, {0x17ec528?, 0xc000487470?}, 0xd?, {0x1290a00?, 0xc00048f890?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:811 +0x15f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0001f9ea0, {0x17ec528, 0xc000487470}, 0xc00048d930, {0x1290a00, 0xc00048f890})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1117 +0x529
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000177c08, {0x17ec528?, 0xc0004873b0?}, 0xc0006f3640)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:708 +0x6c5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc00038a780, {0x17ec528?, 0xc000486bd0?}, 0xc0003a7a40)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:783 +0x309
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x1589f40, 0xc00038a780}, {0x17ec528, 0xc000486bd0}, 0xc00014fc80, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00014b000, {0x17ec528, 0xc000486b40}, {0x17f13e0, 0xc0001d8780}, 0xc000641d40, 0xc000167b60, 0x229e228, 0x0)
google.golang.org/[email protected]/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc00014b000, {0x17f13e0, 0xc0001d8780}, 0xc000641d40)
google.golang.org/[email protected]/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 12
google.golang.org/[email protected]/server.go:1030 +0x125

Error: The terraform-provider-vsphere_v2.10.0_x5 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.

Expected Behavior

it should be able to destroy the resources

Actual Behavior

it should be able to read the data

Steps to Reproduce

craete a vm and detroy the vm

Environment Details

Screenshots

image

References

no references

@sivakumarvaddi786 sivakumarvaddi786 added bug Type: Bug needs-triage Status: Issue Needs Triage labels Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Hello, sivakumarvaddi786! 🖐

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.

@github-actions github-actions bot added the crash Impact: Crash label Dec 4, 2024
@sivakumarvaddi786 sivakumarvaddi786 changed the title terraform vsphere detroy failing with error terraform vsphere destroy failing with error Dec 4, 2024
@tenthirtyam
Copy link
Collaborator

Please use the markdown editor to format for readability.

@tenthirtyam tenthirtyam self-assigned this Dec 17, 2024
@tenthirtyam tenthirtyam added this to the On Deck milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Bug crash Impact: Crash needs-triage Status: Issue Needs Triage
Projects
None yet
Development

No branches or pull requests

2 participants