sylve_vm_network (Resource)
A NIC attached to a sylve_vm beyond its create-time first NIC (sylve_vm’s own switch_name/switch_emulation_type/mac_id). Unlike sylve_vm_storage, no shutoff requirement – NIC attach/detach/update work on a running VM.
Example Usage
# An additional NIC beyond the VM's create-time first one. No shutoff
# requirement -- unlike sylve_vm_storage, this works on a running VM.
resource "sylve_vm_network" "extra_nic" {
rid = sylve_vm.example.rid
switch_name = "lan"
emulation = "virtio"
# mac_id = sylve_network_object.example.id # omit to let Sylve auto-generate one
}
Schema
Required
emulation(String) NIC emulation type, e.g. “virtio” (confirmed against a live VM’s own network entry – not the same value space as sylve_vm_storage’s “virtio-blk”). Updatable in place.rid(Number) RID of the sylve_vm to attach this NIC to. Immutable – moving a NIC between VMs isn’t supported by this resource.switch_name(String) Name of an existing Sylve network switch to attach to. Updatable in place via UpdateNetwork.
Optional
mac_id(Number) ID of an existing sylve_network_object (type “Mac”) to use, instead of letting Sylve auto-generate one. Updatable in place.
Read-Only
id(String) Terraform resource identity – this network entry’s own numeric ID (distinct from the VM’s rid).