adjustment for BPG
This commit is contained in:
parent
54ce238846
commit
419925be91
1 changed files with 33 additions and 6 deletions
|
|
@ -3,12 +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 = false # Changed to match your .conf reality
|
unprivileged = false # Matches your 110.conf (which lacks unprivileged: 1)
|
||||||
|
|
||||||
# This allows Docker to run inside
|
|
||||||
features {
|
features {
|
||||||
nesting = true
|
nesting = true
|
||||||
keyctl = true # Added because 116.conf has this
|
keyctl = true
|
||||||
}
|
}
|
||||||
|
|
||||||
initialization {
|
initialization {
|
||||||
|
|
@ -22,7 +21,6 @@ resource "proxmox_virtual_environment_container" "cattle" {
|
||||||
gateway = each.value.gw
|
gateway = each.value.gw
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# Matching your 1.1.1.1 DNS
|
|
||||||
dns {
|
dns {
|
||||||
servers = ["1.1.1.1"]
|
servers = ["1.1.1.1"]
|
||||||
}
|
}
|
||||||
|
|
@ -33,10 +31,39 @@ resource "proxmox_virtual_environment_container" "cattle" {
|
||||||
type = "debian"
|
type = "debian"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ... cpu, memory, disk, network blocks same as before ...
|
cpu {
|
||||||
|
cores = each.value.cores
|
||||||
|
}
|
||||||
|
|
||||||
|
memory {
|
||||||
|
dedicated = each.value.memory
|
||||||
|
swap = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
disk {
|
||||||
|
datastore_id = each.value.datastore_id
|
||||||
|
size = each.value.disk_size
|
||||||
|
}
|
||||||
|
|
||||||
|
# Mount Point 0
|
||||||
|
mount_point {
|
||||||
|
volume = each.value.mp0_volume
|
||||||
|
path = "/docker"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Mount Point 1
|
||||||
|
mount_point {
|
||||||
|
volume = each.value.mp1_volume
|
||||||
|
path = "/repo"
|
||||||
|
}
|
||||||
|
|
||||||
|
network_interface {
|
||||||
|
name = "eth0"
|
||||||
|
bridge = "vmbr0"
|
||||||
|
vlan_id = each.value.vlan
|
||||||
|
}
|
||||||
|
|
||||||
lifecycle {
|
lifecycle {
|
||||||
# This is the magic. It stops the "Destroy" for these specific things.
|
|
||||||
ignore_changes = [
|
ignore_changes = [
|
||||||
operating_system[0].template_file_id,
|
operating_system[0].template_file_id,
|
||||||
initialization[0].user_account[0].password,
|
initialization[0].user_account[0].password,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue