update for nesting and privilege
This commit is contained in:
parent
a857ed77ac
commit
5243bb37cb
1 changed files with 26 additions and 7 deletions
|
|
@ -3,6 +3,11 @@ resource "proxmox_virtual_environment_container" "cattle" {
|
||||||
|
|
||||||
node_name = each.value.node
|
node_name = each.value.node
|
||||||
vm_id = each.key
|
vm_id = each.key
|
||||||
|
unprivileged = true # Standard for security
|
||||||
|
|
||||||
|
features {
|
||||||
|
nesting = true # Essential for Docker inside LXC
|
||||||
|
}
|
||||||
|
|
||||||
initialization {
|
initialization {
|
||||||
hostname = each.value.hostname
|
hostname = each.value.hostname
|
||||||
|
|
@ -18,7 +23,8 @@ resource "proxmox_virtual_environment_container" "cattle" {
|
||||||
}
|
}
|
||||||
|
|
||||||
operating_system {
|
operating_system {
|
||||||
template_file_id = "local:vdebian-13-standard_13.1-2_amd64.tar.zst"
|
# Updated to your Debian 13 template
|
||||||
|
template_file_id = "local:vztmpl/debian-13-standard_13.1-2_amd64.tar.zst"
|
||||||
type = "debian"
|
type = "debian"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -30,9 +36,22 @@ resource "proxmox_virtual_environment_container" "cattle" {
|
||||||
dedicated = each.value.memory
|
dedicated = each.value.memory
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Root Disk
|
||||||
disk {
|
disk {
|
||||||
datastore_id = "local-lvm"
|
datastore_id = each.value.datastore_id
|
||||||
size = tonumber(replace(each.value.disk_size, "G", "")) # Converts "20G" to 20
|
size = each.value.disk_size
|
||||||
|
}
|
||||||
|
|
||||||
|
# Mount Point 0 (/docker)
|
||||||
|
mount_point {
|
||||||
|
volume = each.value.mp0_volume
|
||||||
|
path = "/docker"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Mount Point 1 (/repo)
|
||||||
|
mount_point {
|
||||||
|
volume = each.value.mp1_volume
|
||||||
|
path = "/repo"
|
||||||
}
|
}
|
||||||
|
|
||||||
network_interface {
|
network_interface {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue