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
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
inv_dir="${repo_root}/infrastructure/terraform/proxmox"
json_out="${repo_root}/data/terraform/proxmox-inventory.json"
md_out="${repo_root}/docs/generated/host-topology.md"
mkdir -p "$(dirname "${json_out}")" "$(dirname "${md_out}")"
(
cd "${inv_dir}"
terraform output -json infrastructure_inventory > "${json_out}"
)
python3 "${repo_root}/scripts/docs/generate_host_topology.py" \
--input "${json_out}" \
--output "${md_out}"
echo "Generated: ${md_out}"