feat(lawndale-vm): extra network interfaces

This commit is contained in:
2025-02-19 01:24:08 +01:00
parent 69408d9be8
commit f4b22647c4
2 changed files with 17 additions and 0 deletions

View File

@@ -47,6 +47,13 @@ resource "libvirt_domain" "this" {
bridge = module.ipam.lawndale_interface
mac = macaddress.this.address
}
dynamic "network_interface" {
for_each = var.extra_interfaces
content {
bridge = network_interface.value.bridge
mac = network_interface.value.mac
}
}
disk {
volume_id = libvirt_volume.this.id

View File

@@ -122,3 +122,13 @@ variable "xslt" {
description = "XSLT applied to the domain before sent to libvirt"
default = null
}
variable "extra_interfaces" {
type = list(object({
bridge = string
mac = string
}))
description = "Extra network interfaces to attach to the VM"
default = []
}