mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-24 03:26:29 +00:00
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:
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user