claude 5d86a17e21
Some checks failed
AI Review / AI Code Review (pull_request) Successful in 4s
PR Checks / OpenTofu Validate & Policy (pull_request) Failing after 8s
Security Scan / Security Scan (pull_request) Successful in 9s
1/1 projects applied successfully.
vm-bot: create vm-201
2026-02-24 09:14:16 +01:00

47 lines
1.2 KiB
HCL

# Tenant VMs — isolated VMs with public IPs for third parties
# Each VM gets: public IP, password auth, fail2ban, UFW, Proxmox FW
#
# MANAGED BY VM BOT — do not edit manually
# To add/remove VMs, use the Telegram bot
#
# Cloud image dependency: proxmox_virtual_environment_download_file.ubuntu_2404_cloud (in main.tf)
locals {
tenant_vms = {
"vm-201" = {
vm_id = 201
public_ip = "185.47.204.227"
password = "2U85aZ8sCJDqxVPK"
ram_mb = 4096
disk_gb = 50
}
}
}
module "tenant_vm" {
source = "../../modules/tenant-vm"
for_each = local.tenant_vms
name = each.key
vm_id = each.value.vm_id
public_ip = each.value.public_ip
password = each.value.password
cpu_cores = lookup(each.value, "cpu_cores", 1)
ram_mb = lookup(each.value, "ram_mb", 4096)
disk_gb = lookup(each.value, "disk_gb", 50)
started = lookup(each.value, "started", true)
depends_on = [proxmox_virtual_environment_download_file.ubuntu_2404_cloud]
}
output "tenant_vms" {
description = "Tenant VM details"
value = {
for name, vm in module.tenant_vm : name => {
vm_id = vm.vm_id
public_ip = vm.public_ip
username = vm.username
}
}
}