feat(lawndale-vm): extra network interfaces
This commit is contained in:
@@ -47,6 +47,13 @@ resource "libvirt_domain" "this" {
|
|||||||
bridge = module.ipam.lawndale_interface
|
bridge = module.ipam.lawndale_interface
|
||||||
mac = macaddress.this.address
|
mac = macaddress.this.address
|
||||||
}
|
}
|
||||||
|
dynamic "network_interface" {
|
||||||
|
for_each = var.extra_interfaces
|
||||||
|
content {
|
||||||
|
bridge = network_interface.value.bridge
|
||||||
|
mac = network_interface.value.mac
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
disk {
|
disk {
|
||||||
volume_id = libvirt_volume.this.id
|
volume_id = libvirt_volume.this.id
|
||||||
|
|||||||
@@ -122,3 +122,13 @@ variable "xslt" {
|
|||||||
description = "XSLT applied to the domain before sent to libvirt"
|
description = "XSLT applied to the domain before sent to libvirt"
|
||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "extra_interfaces" {
|
||||||
|
type = list(object({
|
||||||
|
bridge = string
|
||||||
|
mac = string
|
||||||
|
}))
|
||||||
|
|
||||||
|
description = "Extra network interfaces to attach to the VM"
|
||||||
|
default = []
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user