~> 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_virtual_circuit (Resource)
Use this resource to associate VLAN with a Dedicated Port from Equinix Fabric - software-defined interconnections.
See the Virtual Routing and Forwarding documentation for product details and API reference material.
Example Usage
locals {
project_id = "52000fb2-ee46-4673-93a8-de2c2bdba33c"
conn_id = "73f12f29-3e19-43a0-8e90-ae81580db1e0"
}
data "equinix_metal_connection" test {
connection_id = local.conn_id
}
resource "equinix_metal_vlan" "test" {
project_id = local.project_id
metro = data.equinix_metal_connection.test.metro
}
resource "equinix_metal_virtual_circuit" "test" {
connection_id = local.conn_id
project_id = local.project_id
port_id = data.equinix_metal_connection.test.ports[0].id
vlan_id = equinix_metal_vlan.test.id
nni_vlan = 1056
}
Schema
Required
port_id(String) UUID of the Connection Port where the VC is scoped toproject_id(String) UUID of the Project where the VC is scoped to
Optional
connection_id(String) UUID of Connection where the VC is scoped to. Only used for dedicated connectionscustomer_ip(String) The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.customer_ipv6(String) The Customer IPv6 address which the CSR switch will peer with. Will default to the other usable IP in the IPv6 subnet.description(String) Description of the Virtual Circuit resourcemd5(String, Sensitive) The password that can be set for the VRF BGP peermetal_ip(String) The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet.metal_ipv6(String) The Metal IPv6 address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the IPv6 subnet.name(String) Name of the Virtual Circuit resourcenni_vlan(Number) Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)peer_asn(Number) The BGP ASN of the peer. The same ASN may be the used across several VCs, but it cannot be the same as the local_asn of the VRF.speed(String) Description of the Virtual Circuit speed. This is for information purposes and is computed when the connection type is shared.subnet(String) A subnet from one of the IP blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /30 or /31. * For a /31 block, it will only have two IP addresses, which will be used for the metal_ip and customer_ip. * For a /30 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip.subnet_ipv6(String) A subnet from one of the IPv6 blocks associated with the VRF that we will help create an IP reservation for. Can only be either a /126 or /127. * For a /127 block, it will only have two IP addresses, which will be used for the metal_ip and customer_ip. * For a /126 block, it will have four IP addresses, but the first and last IP addresses are not usable. We will default to the first usable IP address for the metal_ip.tags(List of String) Tags attached to the virtual circuitvirtual_circuit_id(String) UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.vlan_id(String) UUID of the VLAN to associatevrf_id(String) UUID of the VRF to associate
Read-Only
id(String) The ID of this resource.nni_vnid(Number) Nni VLAN ID parameter, see https://docs.equinix.com/metal/interconnections/introduction/status(String) Status of the virtual circuit resourcevnid(Number) VNID VLAN parameter, see https://docs.equinix.com/metal/interconnections/introduction/
Import
Import is supported using the following syntax:
terraform import equinix_metal_virtual_circuit {existing_id}