Skip to content

Resource: proxmox_virtual_environment_network_linux_vlan

Warning

Deprecated: Use proxmox_network_linux_vlan instead. This resource will be removed in v1.0.

Manages a Linux VLAN network interface in a Proxmox VE node.

Example Usage

# using VLAN tag
resource "proxmox_virtual_environment_network_linux_vlan" "vlan99" {
  node_name = "pve"
  name      = "eno0.99"

  comment = "VLAN 99"
}

# using custom network interface name
resource "proxmox_virtual_environment_network_linux_vlan" "vlan98" {
  node_name = "pve"
  name      = "vlan_lab"

  interface = "eno0"
  vlan      = 98
  comment   = "VLAN 98"
}

Schema

Required

  • name (String) The interface name. Either add the VLAN tag number to an existing interface name, e.g. ens18.21 (and do not set interface and vlan), or use custom name, e.g. vlan_lab (interface and vlan are then required).
  • node_name (String) The name of the node.

Optional

  • address (String) The interface IPv4/CIDR address.
  • address6 (String) The interface IPv6/CIDR address.
  • autostart (Boolean) Automatically start interface on boot (defaults to true).
  • comment (String) Comment for the interface.
  • gateway (String) Default gateway address.
  • gateway6 (String) Default IPv6 gateway address.
  • interface (String) The VLAN raw device. See also name.
  • mtu (Number) The interface MTU.
  • timeout_reload (Number) Timeout for network reload operations in seconds (defaults to 100).
  • vlan (Number) The VLAN tag. See also name.

Read-Only

  • id (String) A unique identifier with format <node name>:<iface>.

Import

Import is supported using the following syntax:

#!/usr/bin/env sh
#Interfaces can be imported using the `node_name:iface` format, e.g.
terraform import proxmox_virtual_environment_network_linux_vlan.vlan99 pve:vlan99