Add VM inventory to proxmox outputs for host topology

This commit is contained in:
beatz174-bit
2026-05-13 04:36:38 +10:00
parent bd23339edd
commit a4501d4034
8 changed files with 311 additions and 0 deletions
@@ -13,10 +13,16 @@ output "physical_hosts" {
value = local.physical_hosts
}
output "virtual_hosts" {
description = "Virtual host/VM inventory used for documentation"
value = local.virtual_hosts
}
output "infrastructure_inventory" {
description = "Combined infrastructure inventory"
value = {
physical_hosts = local.physical_hosts
virtual_hosts = local.virtual_hosts
}
}
+55
View File
@@ -21,4 +21,59 @@ locals {
notes = "Raspberry Pi host"
}
}
# Virtual host inventory for documentation output. This is intentionally
# concise and shaped for docs tooling (not a full provider object dump).
virtual_hosts = {
docker = {
name = "docker"
type = "virtual"
role = "docker-host"
proxmox_node = "pve"
vm_id = 103
management_ip = ""
os_family = "linux"
notes = "Primary Docker VM"
}
server_nixos = {
name = "server-nixos"
type = "virtual"
role = "nixos-server"
proxmox_node = "pve"
vm_id = 104
management_ip = ""
os_family = "nixos"
notes = "General-purpose NixOS VM"
}
nix_cache = {
name = "nix-cache"
type = "virtual"
role = "cache"
proxmox_node = "pve"
vm_id = 105
management_ip = ""
os_family = "linux"
notes = "Nix binary cache VM"
}
pbs = {
name = "pbs"
type = "virtual"
role = "backup"
proxmox_node = "pve"
vm_id = 106
management_ip = ""
os_family = "linux"
notes = "Proxmox Backup Server VM"
}
pihole = {
name = "pihole"
type = "virtual"
role = "dns"
proxmox_node = "pve"
vm_id = 108
management_ip = ""
os_family = "linux"
notes = "DNS filtering VM"
}
}
}