Terraform (bpg/proxmox) provisions two Ubuntu 24.04 cloud-init VMs on a Proxmox host, one running obmp-docker's `deploy.sh --scope full-stack` and the other running GoBGP as a BMP-source stand-in. `scripts/run-test.sh` runs the six assertions from docs/design.md (containers healthy, BMP peer up, ip_rib/bgp_peers non-zero, Grafana healthcheck). Layout: terraform/ provider + VM + cloud-init snippet resources terraform/cloud-init/ user-data templates (store + bmpgen) scripts/ run-test.sh, teardown.sh docs/design.md topology, assertion set, and rationale Cred handling: terraform.tfvars is gitignored; endpoint + api_token can also come from PROXMOX_VE_ENDPOINT / PROXMOX_VE_API_TOKEN env vars. Not validated locally: `terraform init && terraform validate` -- the terraform binary is not on the authoring host. YAML + shell + HCL brace balance verified. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
33 lines
912 B
HCL
33 lines
912 B
HCL
terraform {
|
|
required_version = ">= 1.5.0"
|
|
|
|
required_providers {
|
|
proxmox = {
|
|
source = "bpg/proxmox"
|
|
version = "~> 0.60"
|
|
}
|
|
random = {
|
|
source = "hashicorp/random"
|
|
version = "~> 3.6"
|
|
}
|
|
}
|
|
}
|
|
|
|
# Provider config. Endpoint and token can come from PROXMOX_VE_ENDPOINT and
|
|
# PROXMOX_VE_API_TOKEN environment variables instead of tfvars -- preferred
|
|
# for CI / shared workstations. `insecure` should be true only for a lab PVE
|
|
# that presents a self-signed cert.
|
|
provider "proxmox" {
|
|
endpoint = var.pve_endpoint
|
|
api_token = var.pve_api_token
|
|
insecure = var.pve_insecure
|
|
|
|
# SSH is used by the provider for a few operations (snippet uploads, etc).
|
|
# Optional -- if omitted the provider falls back to API-only paths where
|
|
# possible. Set node -> address so the provider doesn't have to resolve.
|
|
ssh {
|
|
agent = true
|
|
username = var.pve_ssh_username
|
|
}
|
|
}
|