Telmate / terraform-provider-proxmox

Terraform provider plugin for proxmox
MIT License
2.19k stars 530 forks source link

Getting this error when making VM from template. VM is created as it should, but plugin crashes. #1084

Open WadDyORedDy opened 2 months ago

WadDyORedDy commented 2 months ago

It's important to note, that the VM was created exactly like it should, and with the correct settings!

The error "interface conversion: interface {} is string, not float64" is weird to me. Nowhere in main.tf is the word 'interface' mentioned.

proxmox_vm_qemu.debian-docker-template: Still creating... [1m0s elapsed] ╷ │ Error: Plugin did not respond │ │ with proxmox_vm_qemu.debian-docker-template, │ on main.tf line 20, in resource "proxmox_vm_qemu" "debian-docker-template": │ 20: resource "proxmox_vm_qemu" "debian-docker-template" { │ │ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may │ contain more details. ╵

Stack trace from the terraform-provider-proxmox_v2.9.3 plugin:

panic: interface conversion: interface {} is string, not float64

goroutine 35 [running]: github.com/Telmate/proxmox-api-go/proxmox.NewConfigQemuFromApi(0xc0001e3130, 0xc000245770, 0xe, 0xc00053e4b0, 0x26) github.com/Telmate/proxmox-api-go@v0.0.0-20211123192920-062fd1a6ab10/proxmox/config_qemu.go:556 +0x5a19 github.com/Telmate/terraform-provider-proxmox/proxmox.resourceVmQemuCreate(0xc000428c80, 0xbc5cc0, 0xc0002457c0, 0x9, 0xffffffffffffffff) github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:798 +0x2905 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).create(0xc0002fc460, 0xe0a8b8, 0xc000353d80, 0xc000428c80, 0xbc5cc0, 0xc0002457c0, 0x0, 0x0, 0x0) github.com/hashicorp/terraform-plugin-sdk/v2@v2.9.0/helper/schema/resource.go:329 +0x1ee github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).Apply(0xc0002fc460, 0xe0a8b8, 0xc000353d80, 0xc0004b6750, 0xc0004a8d00, 0xbc5cc0, 0xc0002457c0, 0x0, 0x0, 0x0, ...) github.com/hashicorp/terraform-plugin-sdk/v2@v2.9.0/helper/schema/resource.go:467 +0x67b github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ApplyResourceChange(0xc00000c0a8, 0xe0a8b8, 0xc000353d80, 0xc00038b0e0, 0xc000353d80, 0xcd0560, 0xc0004aa200) github.com/hashicorp/terraform-plugin-sdk/v2@v2.9.0/helper/schema/grpc_provider.go:977 +0xacf github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ApplyResourceChange(0xc0006481e0, 0xe0a960, 0xc000353d80, 0xc0001255e0, 0xc0006481e0, 0xc0004aa270, 0xc000663ba0) github.com/hashicorp/terraform-plugin-go@v0.4.0/tfprotov5/tf5server/server.go:332 +0xb5 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0xcd0560, 0xc0006481e0, 0xe0a960, 0xc0004aa270, 0xc000146840, 0x0, 0xe0a960, 0xc0004aa270, 0xc0004aea80, 0x9e6) github.com/hashicorp/terraform-plugin-go@v0.4.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:380 +0x214 google.golang.org/grpc.(Server).processUnaryRPC(0xc000032540, 0xe12198, 0xc0000b1980, 0xc0004a4120, 0xc000190090, 0x1251e00, 0x0, 0x0, 0x0) google.golang.org/grpc@v1.42.0/server.go:1282 +0x52b google.golang.org/grpc.(Server).handleStream(0xc000032540, 0xe12198, 0xc0000b1980, 0xc0004a4120, 0x0) google.golang.org/grpc@v1.42.0/server.go:1616 +0xd0c google.golang.org/grpc.(Server).serveStreams.func1.2(0xc000096430, 0xc000032540, 0xe12198, 0xc0000b1980, 0xc0004a4120) google.golang.org/grpc@v1.42.0/server.go:921 +0xab created by google.golang.org/grpc.(Server).serveStreams.func1 google.golang.org/grpc@v1.42.0/server.go:919 +0x1fd

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

WadDyORedDy commented 2 months ago

See #1083 where I found a solution to my other issues :-)

Tinyblargon commented 2 months ago

@WadDyORedDy 2.9.3 is currently broken and the fix required a breaking change. We currently only support 3.0.1-rc3. We cant create an official v3 yet as there are many legacy bugs from 2.x that would require breaking changes to fix.