Skip to main content

~> Deprecation Notice Equinix Metal will reach end of life on June 30, 2026. All Metal resources will be removed in version 5.0.0 of this provider. Use version 4.x of this provider for continued use through sunset. See https://docs.equinix.com/metal/ for more information.

equinix_metal_device_network_type (Resource, Deprecated)

NOTE: The metal_device_network_type resource is deprecated and will be removed in v3 of this provider. Please use metal_port instead. See the Metal Device Network Types guide for more info.

This resource controls network type of Equinix Metal devices.

To learn more about Layer 2 networking in Equinix Metal, refer to

If you are attaching VLAN to a device (i.e. using equinix_metal_port_vlan_attachment), link the device ID from this resource, in order to make the port attachment implicitly dependent on the state of the network type. If you link the device ID from the equinix_metal_device resource, Terraform will not wait for the network type change. See examples in equinix_metal_port_vlan_attachment.

Example Usage

-> NOTE: This resource takes a named network type with any mode required parameters and converts a device to the named network type. This resource simulated the network type interface for Devices in the Equinix Metal Portal. That interface changed when additional network types were introduced with more diverse port configurations and it is not guaranteed to work in devices with more than two ethernet ports. See the Network Types Guide for examples of this resource and to learn about the recommended equinix_metal_port alternative.

Import

This resource can also be imported using existing device ID:

terraform import equinix_metal_device_network_type {existing device_id}

Argument Reference

The following arguments are supported:

  • device_id - (Required) The ID of the device on which the network type should be set.
  • type - (Required) Network type to set. Must be one of layer3, hybrid, hybrid-bonded, layer2-individual and layer2-bonded.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - ID of the controlled device. Use this in linked resources, if you need to wait for the network type change. It is the same as device_id.
Was this page helpful?