I'm having a hard provider crash while doing a terraform plan - it looks like from the logs that the ipconfig returned from the API is a map.
Relevant provider logs:
Wed, 24 Jan 2024 10:21:32 -0600 DBG github.com/TheGameProfi/terraform-provider-proxmox/v2/proxmox/resource_vm_qemu.go:1707 > [READ] Received Config from Proxmox API: {"agent":1,"bios":"seabios","boot":"c","bootdisk":"virtio0","cicustom":"user=ds1618:snippets/k8s-worker-2-user-config.yaml,vendor=ds1618:snippets/agent_install-vendor-config.yaml","ciuser":"ubuntu","description":"K8s Worker 1","disks":{"ide":{"2":{"cloudinit":{"format":"qcow2","storage":"ds1618"}}},"virtio":{"0":{"disk":{"backup":true,"bandwidth":{"mbps":{"read":{},"write":{}},"iops":{"read":{},"write":{}}},"discard":false,"format":"raw","id":0,"iothread":false,"linked":null,"readonly":false,"replicate":true,"size":0,"storage":"ds1618","wwn":""}}}},"hotplug":"network,disk,usb","ipconfig":{"0":"ip=10.0.0.67/24,gw=10.0.0.1"},"memory":4096,"name":"k8s-worker-2","node":"pve-03","onboot":true,"cores":2,"cpu":"host","kvm":true,"network":{"0":{"bridge":"vmbr10","id":0,"macaddr":"A6:3E:40:D6:B5:E7","model":"virtio"},"1":{"bridge":"vmbr2","id":1,"macaddr":"BC:24:11:CF:5C:0A","model":"virtio","mtu":1}},"numa":false,"ostype":"other","serial":{"0":{"id":0,"type":"socket"}},"sockets":1,"vga":{"":null},"scsihw":"virtio-scsi-pci","smbios1":"uuid=3030e642-4740-4910-9fb6-810e0ebc693d","tablet":true,"tags":"k8s;k8s-worker;terraform;ubuntu","vmid":105} loggerName=resource_vm_read vmid=105
2024/01/24 10:21:32 [ERROR] setting state: ipconfig: '': source data must be an array or slice, got map
The relevant part of that json is: "ipconfig":{"0":"ip=10.0.0.67/24,gw=10.0.0.1"},
Stack trace:
Stack trace from the terraform-provider-proxmox_v2.10.0 plugin:
panic: interface conversion: interface {} is nil, not string
goroutine 120 [running]:
github.com/TheGameProfi/terraform-provider-proxmox/v2/proxmox.initConnInfo({0xd4daed?, 0xc000c2a210?}, 0x0?, 0x6?, 0xc0013ba090?, 0xc000f2b030, 0xc0009f2000, 0x1f4?)
github.com/TheGameProfi/terraform-provider-proxmox/v2/proxmox/resource_vm_qemu.go:2277 +0x2bb4
github.com/TheGameProfi/terraform-provider-proxmox/v2/proxmox.resourceVmQemuRead({0xe613e8, 0xc0007cac00}, 0xc000269000, {0xbe2920?, 0xc0007dee10})
github.com/TheGameProfi/terraform-provider-proxmox/v2/proxmox/resource_vm_qemu.go:1693 +0x8aa
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc000438ee0, {0xe61420, 0xc000c4b290}, 0xd?, {0xbe2920, 0xc0007dee10})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.31.0/helper/schema/resource.go:795 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000438ee0, {0xe61420, 0xc000c4b290}, 0xc0003f1040, {0xbe2920, 0xc0007dee10})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.31.0/helper/schema/resource.go:1089 +0x59e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000624000, {0xe61420?, 0xc000c4b170?}, 0xc00025e3c0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.31.0/helper/schema/grpc_provider.go:663 +0x4a5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc00062a000, {0xe61420?, 0xc000c4a9c0?}, 0xc0005a24e0)
github.com/hashicorp/terraform-plugin-go@v0.20.0/tfprotov5/tf5server/server.go:789 +0x4b1
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xd07bc0?, 0xc00062a000}, {0xe61420, 0xc000c4a9c0}, 0xc000268600, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.20.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:467 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001a3000, {0xe61420, 0xc000c4a930}, {0xe650b8, 0xc0004036c0}, 0xc00088efc0, 0xc0006181e0, 0x1379548, 0x0)
google.golang.org/grpc@v1.60.1/server.go:1372 +0xe49
google.golang.org/grpc.(*Server).handleStream(0xc0001a3000, {0xe650b8, 0xc0004036c0}, 0xc00088efc0)
google.golang.org/grpc@v1.60.1/server.go:1783 +0x1031
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.60.1/server.go:1016 +0x68
created by google.golang.org/grpc.(*Server).serveStreams.func2
google.golang.org/grpc@v1.60.1/server.go:1027 +0x12e
Error: The terraform-provider-proxmox_v2.10.0 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.
I'm having a hard provider crash while doing a
terraform plan
- it looks like from the logs that theipconfig
returned from the API is a map.Relevant provider logs:
The relevant part of that json is:
"ipconfig":{"0":"ip=10.0.0.67/24,gw=10.0.0.1"},
Stack trace: