Add VM inventory to proxmox outputs for host topology
This commit is contained in:
Executable
+20
@@ -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}"
|
||||
Reference in New Issue
Block a user