feat: internal bridge

This commit is contained in:
arcnmx 2024-03-22 19:18:24 -07:00
parent 5f36636902
commit 1d1dc64ef5
4 changed files with 78 additions and 0 deletions

View file

@ -1,4 +1,8 @@
locals {
reisen_int_prefix4 = "10.9.1.0/24"
reisen_int_prefix6 = "fd0c::/64"
reisen_int_offset = 32
proxmox_reisen_connection = {
type = "ssh"
user = var.proxmox_reisen_ssh_username
@ -60,3 +64,11 @@ resource "terraform_data" "proxmox_reisen_users" {
]
}
}
resource "proxmox_virtual_environment_network_linux_bridge" "internal" {
node_name = "reisen"
name = "vmbr9"
address = "${cidrhost(local.reisen_int_prefix4, 2)}/24"
address6 = "${cidrhost(local.reisen_int_prefix6, 2)}/64"
comment = "internal private network"
}

View file

@ -143,6 +143,14 @@ EOT
gateway = "10.1.1.1"
}
}
ip_config {
ipv6 {
address = "${cidrhost(local.reisen_int_prefix6, local.proxmox_mediabox_vm_id - local.reisen_int_offset)}/64"
}
ipv4 {
address = "${cidrhost(local.reisen_int_prefix4, local.proxmox_mediabox_vm_id - local.reisen_int_offset)}/24"
}
}
}
startup {
@ -155,6 +163,11 @@ EOT
name = "eth0"
mac_address = "BC:24:11:34:F4:A8"
}
network_interface {
name = "eth9"
mac_address = "BC:24:19:34:F4:A8"
bridge = proxmox_virtual_environment_network_linux_bridge.internal.name
}
operating_system {
template_file_id = var.proxmox_container_template