Skip to content

eos_vlan

Experimental. A VLAN on an Arista EOS switch, and its name.

Experimental. Network devices are new, and this module may change between releases. It’s tested against cEOS-lab 4.37.0F on a local machine, not yet in CI.

Use eos_vlan to create a VLAN on an Arista EOS switch and give it a name. Removing the step deletes the VLAN, unless on_remove = "forget". The change goes through a config session with a revert timer, like every EOS step, including the wait before the confirm, which since v0.10.0 is paid once per switch per apply, not once per step; see eos_config.

step "users" {
eos_vlan {
vlan_id = 10
name = "users"
}
}

One step per VLAN, from a map:

step "vlans" {
for_each = { users = 10, voice = 20, iot = 30 }
eos_vlan {
vlan_id = item.value
name = item.key
}
}
Name Type Required Description
name string No VLAN name: one word, up to 32 characters. Leave unset for the switch’s default, such as VLAN0010; a name set by hand is then removed.
on_remove string No What happens on the switch when this resource is removed: “delete” (default) removes the VLAN, “forget” leaves it.
vlan_id number Yes VLAN ID, 1 to 4094.

Conn3x sets these; reference them as conn3x_eos_vlan.<circuit>__<step>["<host>"].<name>.

Name Type Description
in_sync bool Whether the VLAN was there, with this name, at the last refresh.
revision string Changes each time Conn3x changes this on the host. Handlers watch it.

A step lowers to the conn3x_eos_vlan resource, one instance per host, and connects with its circuit’s ssh block.