ci: add Control Center bootstrap script and RenovateBot workflow

This commit is contained in:
Tibo De Peuter 2026-07-17 22:08:37 +02:00
parent dd2065cf60
commit 960f8f63fe
Signed by: tdpeuter
SSH key fingerprint: SHA256:u/h/LVoqKF1Iz02uOyxe6hcjmoZASCGV2HM0TG9ZMoU
2 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -euo pipefail
echo "=========================================="
echo " Bootstrapping Control Center VM "
echo "=========================================="
# Ensure script is run with appropriate permissions (this script might run as part of Cloud-Init or manually)
if ! command -v terraform &> /dev/null; then
echo "Terraform not found. Please ensure it is installed via Nix."
exit 1
fi
echo "1. Initializing proxmox-bootstrap state..."
cd terraform/proxmox-bootstrap
terraform init
echo "2. Applying proxmox-bootstrap (Requires manual approval if not passing -auto-approve)"
echo " This will configure the restricted terraform@pve user on the Proxmox host."
# Uncomment the following line to auto-approve in a fully automated environment
# terraform apply -auto-approve
terraform apply
echo "3. Fetching the generated API token..."
TF_TOKEN=$(terraform output -raw terraform_api_token)
echo "=========================================="
echo " IMPORTANT: Save the following token into "
echo " Forgejo Secrets as PROXMOX_TOKEN_SECRET "
echo "=========================================="
echo "$TF_TOKEN"
echo "=========================================="
echo "Control Center Bootstrap Complete."