Fix: add lifecycle ignore_changes to prevent VM replacement on cloud-init updates
Some checks failed
PR Checks / tofu-checks (pull_request) Failing after 3s
1/1 projects applied successfully.
Some checks failed
PR Checks / tofu-checks (pull_request) Failing after 3s
1/1 projects applied successfully.
This commit is contained in:
parent
e43f4dfc90
commit
a32b76033f
@ -30,6 +30,10 @@ resource "proxmox_virtual_environment_file" "cloud_init" {
|
||||
})
|
||||
file_name = "ci-${var.name}.yaml"
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [source_raw]
|
||||
}
|
||||
}
|
||||
|
||||
# ─── VM ───────────────────────────────────────────────────────────────────────
|
||||
@ -86,4 +90,12 @@ resource "proxmox_virtual_environment_vm" "k8s_node" {
|
||||
servers = ["8.8.8.8", "1.1.1.1"]
|
||||
}
|
||||
}
|
||||
|
||||
# Cloud-init changes should NOT trigger VM replacement.
|
||||
# CPU/RAM/disk changes are safe in-place updates.
|
||||
lifecycle {
|
||||
ignore_changes = [
|
||||
initialization[0].user_data_file_id,
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user