NatiSayada / k3s-proxmox-terraform-ansible

Apache License 2.0
117 stars 51 forks source link

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

Open kifeo opened 8 months ago

kifeo commented 8 months ago

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

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

goroutine 108 [running]: github.com/Telmate/proxmox-api-go/proxmox.NewConfigQemuFromApi(0xc00034e718, 0xc9d509?) github.com/Telmate/proxmox-api-go@v0.0.0-20230319185744-e7cde7198cdf/proxmox/config_qemu.go:584 +0x4605 github.com/Telmate/terraform-provider-proxmox/proxmox.resourceVmQemuCreate(0xc000360b00, {0xb66f60?, 0xc0000ea050}) github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:972 +0x2c4d github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).create(0xdd7840?, {0xdd7840?, 0xc000b1cb40?}, 0xd?, {0xb66f60?, 0xc0000ea050?}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/resource.go:695 +0x178 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).Apply(0xc0003d67e0, {0xdd7840, 0xc000b1cb40}, 0xc000c1d2b0, 0xc000360980, {0xb66f60, 0xc0000ea050}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/resource.go:837 +0xa85 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ApplyResourceChange(0xc000460b70, {0xdd7840?, 0xc000b1ca20?}, 0xc0001f8640) github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/grpc_provider.go:1021 +0xe8d github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ApplyResourceChange(0xc0001303c0, {0xdd7840?, 0xc000b1c000?}, 0xc00027e070) github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/tf5server/server.go:818 +0x574 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xc6bc20?, 0xc0001303c0}, {0xdd7840, 0xc000b1c000}, 0xc00027e000, 0x0) github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x170 google.golang.org/grpc.(Server).processUnaryRPC(0xc00047a000, {0xddb420, 0xc00030b040}, 0xc000166120, 0xc00047ccc0, 0x128f7a0, 0x0) google.golang.org/grpc@v1.53.0/server.go:1336 +0xd23 google.golang.org/grpc.(Server).handleStream(0xc00047a000, {0xddb420, 0xc00030b040}, 0xc000166120, 0x0) google.golang.org/grpc@v1.53.0/server.go:1704 +0xa2f google.golang.org/grpc.(Server).serveStreams.func1.2() google.golang.org/grpc@v1.53.0/server.go:965 +0x98 created by google.golang.org/grpc.(Server).serveStreams.func1 google.golang.org/grpc@v1.53.0/server.go:963 +0x28a

Error: The terraform-provider-proxmox_v2.9.14 plugin crashed!

AirP0WeR commented 7 months ago

Hi there!

Use new provider 3.0.1-rc1 or downgrade proxmot to 8.03

terraform {
  required_providers {
    proxmox = {
      source  = "telmate/proxmox"
      version = "3.0.1-rc1"
    }
  }
}
aracloud commented 1 month ago

3.0.1-rc1 does not work in my env. I tested it with 2.9.6. Terraform did not went through successfully due to cloud-init ip configuration. Added this manually on all instances and it worked. So, there must be some issue with cloud-init somewhere.