opentofu: give the woodpecker-agent LXCs IPv6 (root cause) #54

Merged
k.renner merged 1 commits from agents-lxc-ipv6 into master 2026-06-26 13:19:36 +00:00
3 changed files with 29 additions and 7 deletions
+14 -7
View File
@@ -24,6 +24,13 @@ resource "proxmox_virtual_environment_container" "this" {
address = var.ip_address != null ? "${var.ip_address}/24" : "dhcp"
gateway = var.ip_address != null ? cidrhost("${var.ip_address}/24", 1) : null
}
dynamic "ipv6" {
for_each = var.ipv6_address != null ? [1] : []
content {
address = var.ipv6_address
gateway = var.ipv6_gateway
}
}
}
}
@@ -97,13 +104,13 @@ resource "proxmox_virtual_environment_container" "this" {
lifecycle {
ignore_changes = [
node_name, # HA migrations move containers between nodes
initialization, # Hostname/user changes can cause issues
disk, # Disk changes can be destructive
mount_point, # Mount point changes force replacement
operating_system, # Template changes would require recreation
features, # API token can't modify features on privileged containers (requires root@pam)
network_interface # Network changes can disrupt running services and cause connectivity issues
node_name, # HA migrations move containers between nodes
initialization, # Hostname/user changes can cause issues
disk, # Disk changes can be destructive
mount_point, # Mount point changes force replacement
operating_system, # Template changes would require recreation
features, # API token can't modify features on privileged containers (requires root@pam)
network_interface # Network changes can disrupt running services and cause connectivity issues
]
}
}
+12
View File
@@ -37,6 +37,18 @@ variable "ip_address" {
default = null
}
variable "ipv6_address" {
type = string
description = "IPv6 config for the container: \"auto\" (SLAAC), \"dhcp\", or a static CIDR. null disables IPv6."
default = null
}
variable "ipv6_gateway" {
type = string
description = "IPv6 gateway (only for a static ipv6_address; leave null for auto/dhcp)."
default = null
}
variable "tags" {
type = string
default = ""
+3
View File
@@ -23,6 +23,9 @@ module "woodpecker_agents" {
start = each.value.state == "started" ? true : false
network_bridge = each.value.bridge
# CI steps must reach IPv6-only hosts; give the LXC SLAAC v6 off v40srv so
# Docker has a v6 uplink to NAT the pipeline networks onto.
ipv6_address = "auto"
features = {
nesting = each.value.nesting