Files
calchat-pipeline/tofu/main.tf

78 lines
1.4 KiB
HCL

provider "proxmox" {
endpoint = var.proxmox_endpoint
username = "root@pam"
password = var.proxmox_password
insecure = true
ssh {
agent = true
username = "root"
}
}
resource "proxmox_virtual_environment_download_file" "debian_13_lxc_template" {
content_type = "vztmpl"
datastore_id = "local"
node_name = var.node_name
url = "http://download.proxmox.com/images/system/debian-13-standard_13.1-2_amd64.tar.zst"
}
resource "proxmox_virtual_environment_container" "drone_runner" {
node_name = var.node_name
vm_id = var.drone_runner_id
description = "Drone CI Runner with Docker"
unprivileged = false
started = true
features {
nesting = true
keyctl = true
}
operating_system {
template_file_id = proxmox_virtual_environment_download_file.debian_13_lxc_template.id
type = "debian"
}
initialization {
hostname = "drone-runner"
ip_config {
ipv4 {
address = var.drone_runner_ip
gateway = var.gateway
}
}
user_account {
keys = [trimspace(file(var.ssh_public_key_path))]
password = var.drone_runner_password
}
}
network_interface {
name = "eth0"
bridge = "vmbr0"
}
disk {
datastore_id = "local-lvm"
size = 16
}
cpu {
cores = 2
}
memory {
dedicated = 2048
swap = 512
}
startup {
order = "1"
}
}