-
Notifications
You must be signed in to change notification settings - Fork 546
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
panic: interface conversion: interface {} is string, not float64 #1209
Comments
I get the same error, although the VM is created and i can manually start it up fine. When i enable debug logging, it looks like the type error is in the response from proxmox, where the "memory" is is formatted as a string unlike e.g. "cores". This is the my first time trying out both proxmox and terraform, so I might be wrong.
|
I had a try at it again, where i set up a proxy between terraform and proxmox, that changed the value of "memory" from string to integer for requests to the endpoint This could easily be handled by the provider, but isn't this an error that should be fixed in Proxmox? |
Same problem for me, any fix please ? |
Hi there, Unfortunately the 2.x provider version is broken. |
Everything is fine in 3.0.1-rc6 thank you 👍 |
When i try to apply followong terraform the plugin does crash
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
Terraform will perform the following actions:
proxmox_vm_qemu.vm-instance will be created
additional_wait = 5
automatic_reboot = true
balloon = 0
bios = "seabios"
boot = (known after apply)
bootdisk = (known after apply)
clone = "ubuntu-2404-template"
clone_wait = 10
cores = 2
cpu = "host"
default_ipv4_address = (known after apply)
define_connection_info = true
force_create = false
full_clone = true
guest_agent_ready_timeout = 100
hotplug = "network,disk,usb"
id = (known after apply)
kvm = true
memory = 2048
name = "vm-instance"
nameserver = (known after apply)
onboot = false
oncreate = true
preprovision = true
reboot_required = (known after apply)
scsihw = "lsi"
searchdomain = (known after apply)
sockets = 1
ssh_host = (known after apply)
ssh_port = (known after apply)
tablet = true
target_node = "pve01"
unused_disk = (known after apply)
vcpus = 0
vlan = -1
vmid = (known after apply)
disk {
}
network {
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
proxmox_vm_qemu.vm-instance: Creating...
╷
│ Error: Plugin did not respond
│
│ with proxmox_vm_qemu.vm-instance,
│ on main.tf line 16, in resource "proxmox_vm_qemu" "vm-instance":
│ 16: resource "proxmox_vm_qemu" "vm-instance" {
│
│ 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.14.exe plugin:
panic: interface conversion: interface {} is string, not float64
goroutine 106 [running]:
github.com/Telmate/proxmox-api-go/proxmox.NewConfigQemuFromApi(0xc0003006c0, 0x0?)
github.com/Telmate/[email protected]/proxmox/config_qemu.go:584 +0x4605
github.com/Telmate/terraform-provider-proxmox/proxmox.prepareDiskSize(0x0?, 0xc0003125c0?, 0xb?, 0x0?)
github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:1737 +0xeb
github.com/Telmate/terraform-provider-proxmox/proxmox.resourceVmQemuCreate(0xc000274900, {0xa58680?, 0xc0003351d0})
github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:1059 +0x1cb2
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xcda800?, {0xcda800?, 0xc000108b70?}, 0xd?, {0xa58680?, 0xc0003351d0?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:695 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0003dc7e0, {0xcda800, 0xc000108b70}, 0xc000596ea0, 0xc000274a80, {0xa58680, 0xc0003351d0})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:837 +0xa85
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000464c60, {0xcda800?, 0xc000108a50?}, 0xc0004f4230)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1021 +0xe8d
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc00011a3c0, {0xcda800?, 0xc00018a390?}, 0xc000210070)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:818 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xb5f460?, 0xc00011a3c0}, {0xcda800, 0xc00018a390}, 0xc000210000, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00047e000, {0xcde3e0, 0xc0005841a0}, 0xc0003a2000, 0xc000480c00, 0x11a0880, 0x0)
google.golang.org/[email protected]/server.go:1336 +0xd23
google.golang.org/grpc.(*Server).handleStream(0xc00047e000, {0xcde3e0, 0xc0005841a0}, 0xc0003a2000, 0x0)
google.golang.org/[email protected]/server.go:1704 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/[email protected]/server.go:965 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:963 +0x28a
Error: The terraform-provider-proxmox_v2.9.14.exe plugin crashed!
The text was updated successfully, but these errors were encountered: