Files
Terraform/grail.tf
tolerryan 2e28fe1ae1 fix
2025-05-26 02:32:46 -05:00

66 lines
1.5 KiB
HCL

resource "proxmox_lxc" "grail" {
target_node = "ryuk"
hostname = "grail-tf"
vmid = 218
ostemplate = "cephfs:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst"
password = "terraform"
unprivileged = true
cores = 6
memory = 8096
swap = 1024
start = true
tags = "terraform"
nameserver = "192.168.0.224"
ssh_public_keys = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINFw70PrMsilcsqCrwW1I6PAt3anQbhmVg+t/HUfomug ryan@mxDesktop"
features {
nesting = true
}
rootfs {
storage = "local-lvm"
size = "42G"
}
mountpoint {
key = "1"
slot = 1
# Dir on host
storage = "/omv/media"
# volume is needed as a workaround for bug
volume = "/omv/media"
# mountpoint within container
mp = "/media"
# This is ignored as mount point is used. but must be defined
size = "10G"
}
mountpoint {
key = "2"
slot = 2
# Dir on host
storage = "/omv/downloads"
# volume is needed as a workaround for bug
volume = "/omv/downloads"
# mountpoint within container
mp = "/downloads"
# This is ignored as mount point is used. but must be defined
size = "10G"
}
network {
name = "eth0"
bridge = "vmbr0"
ip = "192.168.0.57/24"
gw = "192.168.0.1"
}
provisioner "local-exec" {
command = "./.ansible.d/setup.sh $IP"
environment = {
IP = "192.168.0.57"
}
}
}