fix: upload one ISO per PVE version, not per node

Changed Terraform ISO resource from for_each=pve_instances (per-node)
to for_each=pve_isos (per-version). With HTTP answer server, both
nodes of the same version share the same generic ISO.

New pve_isos variable maps version to ISO path. pve_instances now
has pve_version field instead of iso_local_path. VMs reference
their version's ISO via auto_iso[each.value.pve_version].

Updated run-integration.sh tfvars generation and -target flags
for both provision and cleanup to use the new schema.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-25 14:43:15 -05:00
parent a27863f4ef
commit 53e567f38b
3 changed files with 44 additions and 27 deletions
+4 -3
View File
@@ -24,13 +24,14 @@ provider "docker" {
}
resource "proxmox_virtual_environment_file" "auto_iso" {
for_each = var.pve_instances
for_each = var.pve_isos
content_type = "iso"
datastore_id = var.iso_storage
node_name = var.target_node
overwrite = true
source_file {
path = each.value.iso_local_path
path = each.value
}
}
@@ -69,7 +70,7 @@ resource "proxmox_virtual_environment_vm" "nested_pve" {
}
cdrom {
file_id = proxmox_virtual_environment_file.auto_iso[each.key].id
file_id = proxmox_virtual_environment_file.auto_iso[each.value.pve_version].id
interface = "ide2"
}