fix(tf): work around provider bugs

This commit is contained in:
arcnmx 2024-03-24 11:52:33 -07:00
parent c61220b641
commit d94e7e9f7b
3 changed files with 10 additions and 9 deletions

View file

@ -116,7 +116,7 @@
}; };
}; };
confInternal = { confInternal = {
name = mkAlmostOptionDefault "eth9"; name = mkIf system.proxmox.container.enable (mkAlmostOptionDefault "eth9");
bridge = mkAlmostOptionDefault "vmbr9"; bridge = mkAlmostOptionDefault "vmbr9";
address4 = mkAlmostOptionDefault "10.9.1.${toString (system.proxmox.vm.id - internalOffset)}/24"; address4 = mkAlmostOptionDefault "10.9.1.${toString (system.proxmox.vm.id - internalOffset)}/24";
address6 = mkAlmostOptionDefault "fd0c::${toHexString (system.proxmox.vm.id - internalOffset)}/64"; address6 = mkAlmostOptionDefault "fd0c::${toHexString (system.proxmox.vm.id - internalOffset)}/64";

View file

@ -11,11 +11,12 @@ _: {
address4 = "10.1.1.47/24"; address4 = "10.1.1.47/24";
address6 = "auto"; address6 = "auto";
}; };
net1 = { net1.internal.enable = true;
net2 = {
name = "eth1";
macAddress = "BC:24:11:C4:66:AA"; macAddress = "BC:24:11:C4:66:AA";
networkd.networkSettings.linkConfig.RequiredForOnline = false; networkd.networkSettings.linkConfig.RequiredForOnline = false;
}; };
net2.internal.enable = true;
}; };
}; };
} }

View file

@ -325,8 +325,6 @@ EOT
gateway = "10.1.1.1" gateway = "10.1.1.1"
} }
} }
# empty block required if additional interfaces are added, but causes state sync issues
ip_config {}
ip_config { ip_config {
ipv6 { ipv6 {
address = "${cidrhost(local.reisen_int_prefix6, local.proxmox_aya_vm_id - local.reisen_int_offset)}/64" address = "${cidrhost(local.reisen_int_prefix6, local.proxmox_aya_vm_id - local.reisen_int_offset)}/64"
@ -335,6 +333,8 @@ EOT
address = "${cidrhost(local.reisen_int_prefix4, local.proxmox_aya_vm_id - local.reisen_int_offset)}/24" address = "${cidrhost(local.reisen_int_prefix4, local.proxmox_aya_vm_id - local.reisen_int_offset)}/24"
} }
} }
# empty block causes state sync issues
#ip_config {}
} }
startup { startup {
@ -347,15 +347,15 @@ EOT
name = "eth0" name = "eth0"
mac_address = "BC:24:11:C4:66:A9" mac_address = "BC:24:11:C4:66:A9"
} }
network_interface {
name = "eth1"
mac_address = "BC:24:11:C4:66:AA"
}
network_interface { network_interface {
name = "eth9" name = "eth9"
mac_address = "BC:24:19:C4:66:A9" mac_address = "BC:24:19:C4:66:A9"
bridge = proxmox_virtual_environment_network_linux_bridge.internal.name bridge = proxmox_virtual_environment_network_linux_bridge.internal.name
} }
network_interface {
name = "eth1"
mac_address = "BC:24:11:C4:66:AA"
}
operating_system { operating_system {
template_file_id = var.proxmox_container_template template_file_id = var.proxmox_container_template