[PR #238] [MERGED] Fix empty cloud init ipconfig #332

Closed
opened 2026-02-28 00:41:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/238
Author: @tnyeanderson
Created: 2/12/2023
Status: Merged
Merged: 3/2/2023
Merged by: @mleone87

Base: masterHead: fix-cloud-init-ipconfig


📝 Commits (1)

  • 9776008 ignore empty ipconfig entries

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 proxmox/config_qemu.go (+1 -1)

📄 Description

For the life of me I cannot figure out what is happening... but empty (non-existent) config.Ipconfig entries are being unmarshaled as empty strings instead of nil which causes the insurmountable error below:

proxmox_vm_qemu.docker-test: Creating...
╷
│ Error: cloud-init parameters only supported on clones or updates
│
│   with proxmox_vm_qemu.docker-test,
│   on docker-test.tf line 1, in resource "proxmox_vm_qemu" "docker-test":
│    1: resource "proxmox_vm_qemu" "docker-test" {
│
╵

Below is the docker-test terraform config:

resource "proxmox_vm_qemu" "docker-test" {
  name        = "docker-test"
  target_node = "node1"
  boot        = "order=ide2;scsi0;net0"
  pxe         = true
  cores       = 4
  memory      = 8192
  network {
    bridge   = "vmbr0"
    firewall = true
    model    = "virtio"
    macaddr  = "<redacted>"
  }
  disk {
    type    = "scsi"
    storage = "local-lvm"
    size    = "8G"
  }
}

I have tried bisecting the issue and cannot pin down where it was introduced or why it is happening. But the included fix makes it work for me.

P.S. I was able to determine that, in my case, none of the Ipconfig entries were unmarshaled as anything except an empty string (no nil, and no actual definitions).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Telmate/proxmox-api-go/pull/238 **Author:** [@tnyeanderson](https://github.com/tnyeanderson) **Created:** 2/12/2023 **Status:** ✅ Merged **Merged:** 3/2/2023 **Merged by:** [@mleone87](https://github.com/mleone87) **Base:** `master` ← **Head:** `fix-cloud-init-ipconfig` --- ### 📝 Commits (1) - [`9776008`](https://github.com/Telmate/proxmox-api-go/commit/9776008cda27a004fca3e9449792712f4a6c60d4) ignore empty ipconfig entries ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `proxmox/config_qemu.go` (+1 -1) </details> ### 📄 Description For the life of me I cannot figure out what is happening... but empty (non-existent) `config.Ipconfig` entries are being unmarshaled as empty strings instead of `nil` which causes the insurmountable error below: ``` proxmox_vm_qemu.docker-test: Creating... ╷ │ Error: cloud-init parameters only supported on clones or updates │ │ with proxmox_vm_qemu.docker-test, │ on docker-test.tf line 1, in resource "proxmox_vm_qemu" "docker-test": │ 1: resource "proxmox_vm_qemu" "docker-test" { │ ╵ ``` Below is the `docker-test` terraform config: ``` resource "proxmox_vm_qemu" "docker-test" { name = "docker-test" target_node = "node1" boot = "order=ide2;scsi0;net0" pxe = true cores = 4 memory = 8192 network { bridge = "vmbr0" firewall = true model = "virtio" macaddr = "<redacted>" } disk { type = "scsi" storage = "local-lvm" size = "8G" } } ``` I have tried bisecting the issue and cannot pin down where it was introduced or why it is happening. But the included fix makes it work for me. P.S. I was able to determine that, in my case, *none* of the Ipconfig entries were unmarshaled as anything except an empty string (no `nil`, and no actual definitions). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:41:47 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#332
No description provided.