1. Packages
  2. Equinix
  3. API Docs
  4. metal
  5. VirtualCircuit
Equinix v0.22.0 published on Wednesday, Apr 23, 2025 by Equinix

equinix.metal.VirtualCircuit

Explore with Pulumi AI

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

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Equinix = Pulumi.Equinix;

return await Deployment.RunAsync(() => 
{
    var projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c";

    var connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0";

    var test = Equinix.Metal.GetInterconnection.Invoke(new()
    {
        ConnectionId = connId,
    });

    var testVlan = new Equinix.Metal.Vlan("testVlan", new()
    {
        ProjectId = projectId,
        Metro = test.Apply(getInterconnectionResult => getInterconnectionResult.Metro),
    });

    var testVirtualCircuit = new Equinix.Metal.VirtualCircuit("testVirtualCircuit", new()
    {
        ConnectionId = connId,
        ProjectId = projectId,
        PortId = test.Apply(getInterconnectionResult => getInterconnectionResult.Ports[0]?.Id),
        VlanId = testVlan.Id,
        NniVlan = 1056,
    });

});
Copy
package main

import (
	"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		projectId := "52000fb2-ee46-4673-93a8-de2c2bdba33c"
		connId := "73f12f29-3e19-43a0-8e90-ae81580db1e0"
		test := metal.LookupInterconnectionOutput(ctx, metal.GetInterconnectionOutputArgs{
			ConnectionId: pulumi.String(connId),
		}, nil)
		testVlan, err := metal.NewVlan(ctx, "testVlan", &metal.VlanArgs{
			ProjectId: pulumi.String(projectId),
			Metro: pulumi.String(test.ApplyT(func(test metal.GetInterconnectionResult) (*string, error) {
				return &test.Metro, nil
			}).(pulumi.StringPtrOutput)),
		})
		if err != nil {
			return err
		}
		_, err = metal.NewVirtualCircuit(ctx, "testVirtualCircuit", &metal.VirtualCircuitArgs{
			ConnectionId: pulumi.String(connId),
			ProjectId:    pulumi.String(projectId),
			PortId: pulumi.String(test.ApplyT(func(test metal.GetInterconnectionResult) (*string, error) {
				return &test.Ports[0].Id, nil
			}).(pulumi.StringPtrOutput)),
			VlanId:  testVlan.ID(),
			NniVlan: pulumi.Int(1056),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.equinix.metal.MetalFunctions;
import com.pulumi.equinix.metal.inputs.GetInterconnectionArgs;
import com.pulumi.equinix.metal.Vlan;
import com.pulumi.equinix.metal.VlanArgs;
import com.pulumi.equinix.metal.VirtualCircuit;
import com.pulumi.equinix.metal.VirtualCircuitArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c";

        final var connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0";

        final var test = MetalFunctions.getInterconnection(GetInterconnectionArgs.builder()
            .connectionId(connId)
            .build());

        var testVlan = new Vlan("testVlan", VlanArgs.builder()
            .projectId(projectId)
            .metro(test.applyValue(_test -> _test.metro()))
            .build());

        var testVirtualCircuit = new VirtualCircuit("testVirtualCircuit", VirtualCircuitArgs.builder()
            .connectionId(connId)
            .projectId(projectId)
            .portId(test.applyValue(_test -> _test.ports()[0].id()))
            .vlanId(testVlan.id())
            .nniVlan(1056)
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as equinix from "@equinix-labs/pulumi-equinix";
import * as equinix from "@pulumi/equinix";

const projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c";
const connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0";
const test = equinix.metal.getInterconnectionOutput({
    connectionId: connId,
});
const testVlan = new equinix.metal.Vlan("testVlan", {
    projectId: projectId,
    metro: test.apply(test => test.metro),
});
const testVirtualCircuit = new equinix.metal.VirtualCircuit("testVirtualCircuit", {
    connectionId: connId,
    projectId: projectId,
    portId: test.apply(test => test.ports?.[0]?.id),
    vlanId: testVlan.id,
    nniVlan: 1056,
});
Copy
import pulumi
import pulumi_equinix as equinix

project_id = "52000fb2-ee46-4673-93a8-de2c2bdba33c"
conn_id = "73f12f29-3e19-43a0-8e90-ae81580db1e0"
test = equinix.metal.get_interconnection_output(connection_id=conn_id)
test_vlan = equinix.metal.Vlan("testVlan",
    project_id=project_id,
    metro=test.metro)
test_virtual_circuit = equinix.metal.VirtualCircuit("testVirtualCircuit",
    connection_id=conn_id,
    project_id=project_id,
    port_id=test.ports[0].id,
    vlan_id=test_vlan.id,
    nni_vlan=1056)
Copy
resources:
  testVlan:
    type: equinix:metal:Vlan
    name: test
    properties:
      projectId: ${projectId}
      metro: ${test.metro}
  testVirtualCircuit:
    type: equinix:metal:VirtualCircuit
    name: test
    properties:
      connectionId: ${connId}
      projectId: ${projectId}
      portId: ${test.ports[0].id}
      vlanId: ${testVlan.id}
      nniVlan: 1056
variables:
  projectId: 52000fb2-ee46-4673-93a8-de2c2bdba33c
  connId: 73f12f29-3e19-43a0-8e90-ae81580db1e0
  test:
    fn::invoke:
      function: equinix:metal:getInterconnection
      arguments:
        connectionId: ${connId}
Copy

Create VirtualCircuit Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VirtualCircuit(name: string, args: VirtualCircuitArgs, opts?: CustomResourceOptions);
@overload
def VirtualCircuit(resource_name: str,
                   args: VirtualCircuitArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def VirtualCircuit(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   port_id: Optional[str] = None,
                   project_id: Optional[str] = None,
                   nni_vlan: Optional[int] = None,
                   customer_ip: Optional[str] = None,
                   md5: Optional[str] = None,
                   metal_ip: Optional[str] = None,
                   metal_ipv6: Optional[str] = None,
                   name: Optional[str] = None,
                   connection_id: Optional[str] = None,
                   peer_asn: Optional[int] = None,
                   customer_ipv6: Optional[str] = None,
                   description: Optional[str] = None,
                   speed: Optional[str] = None,
                   subnet: Optional[str] = None,
                   subnet_ipv6: Optional[str] = None,
                   tags: Optional[Sequence[str]] = None,
                   virtual_circuit_id: Optional[str] = None,
                   vlan_id: Optional[str] = None,
                   vrf_id: Optional[str] = None)
func NewVirtualCircuit(ctx *Context, name string, args VirtualCircuitArgs, opts ...ResourceOption) (*VirtualCircuit, error)
public VirtualCircuit(string name, VirtualCircuitArgs args, CustomResourceOptions? opts = null)
public VirtualCircuit(String name, VirtualCircuitArgs args)
public VirtualCircuit(String name, VirtualCircuitArgs args, CustomResourceOptions options)
type: equinix:metal:VirtualCircuit
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VirtualCircuitArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VirtualCircuitArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VirtualCircuitArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VirtualCircuitArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VirtualCircuitArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var virtualCircuitResource = new Equinix.Metal.VirtualCircuit("virtualCircuitResource", new()
{
    PortId = "string",
    ProjectId = "string",
    NniVlan = 0,
    CustomerIp = "string",
    Md5 = "string",
    MetalIp = "string",
    MetalIpv6 = "string",
    Name = "string",
    ConnectionId = "string",
    PeerAsn = 0,
    CustomerIpv6 = "string",
    Description = "string",
    Speed = "string",
    Subnet = "string",
    SubnetIpv6 = "string",
    Tags = new[]
    {
        "string",
    },
    VirtualCircuitId = "string",
    VlanId = "string",
    VrfId = "string",
});
Copy
example, err := metal.NewVirtualCircuit(ctx, "virtualCircuitResource", &metal.VirtualCircuitArgs{
	PortId:       pulumi.String("string"),
	ProjectId:    pulumi.String("string"),
	NniVlan:      pulumi.Int(0),
	CustomerIp:   pulumi.String("string"),
	Md5:          pulumi.String("string"),
	MetalIp:      pulumi.String("string"),
	MetalIpv6:    pulumi.String("string"),
	Name:         pulumi.String("string"),
	ConnectionId: pulumi.String("string"),
	PeerAsn:      pulumi.Int(0),
	CustomerIpv6: pulumi.String("string"),
	Description:  pulumi.String("string"),
	Speed:        pulumi.String("string"),
	Subnet:       pulumi.String("string"),
	SubnetIpv6:   pulumi.String("string"),
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
	VirtualCircuitId: pulumi.String("string"),
	VlanId:           pulumi.String("string"),
	VrfId:            pulumi.String("string"),
})
Copy
var virtualCircuitResource = new VirtualCircuit("virtualCircuitResource", VirtualCircuitArgs.builder()
    .portId("string")
    .projectId("string")
    .nniVlan(0)
    .customerIp("string")
    .md5("string")
    .metalIp("string")
    .metalIpv6("string")
    .name("string")
    .connectionId("string")
    .peerAsn(0)
    .customerIpv6("string")
    .description("string")
    .speed("string")
    .subnet("string")
    .subnetIpv6("string")
    .tags("string")
    .virtualCircuitId("string")
    .vlanId("string")
    .vrfId("string")
    .build());
Copy
virtual_circuit_resource = equinix.metal.VirtualCircuit("virtualCircuitResource",
    port_id="string",
    project_id="string",
    nni_vlan=0,
    customer_ip="string",
    md5="string",
    metal_ip="string",
    metal_ipv6="string",
    name="string",
    connection_id="string",
    peer_asn=0,
    customer_ipv6="string",
    description="string",
    speed="string",
    subnet="string",
    subnet_ipv6="string",
    tags=["string"],
    virtual_circuit_id="string",
    vlan_id="string",
    vrf_id="string")
Copy
const virtualCircuitResource = new equinix.metal.VirtualCircuit("virtualCircuitResource", {
    portId: "string",
    projectId: "string",
    nniVlan: 0,
    customerIp: "string",
    md5: "string",
    metalIp: "string",
    metalIpv6: "string",
    name: "string",
    connectionId: "string",
    peerAsn: 0,
    customerIpv6: "string",
    description: "string",
    speed: "string",
    subnet: "string",
    subnetIpv6: "string",
    tags: ["string"],
    virtualCircuitId: "string",
    vlanId: "string",
    vrfId: "string",
});
Copy
type: equinix:metal:VirtualCircuit
properties:
    connectionId: string
    customerIp: string
    customerIpv6: string
    description: string
    md5: string
    metalIp: string
    metalIpv6: string
    name: string
    nniVlan: 0
    peerAsn: 0
    portId: string
    projectId: string
    speed: string
    subnet: string
    subnetIpv6: string
    tags:
        - string
    virtualCircuitId: string
    vlanId: string
    vrfId: string
Copy

VirtualCircuit Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The VirtualCircuit resource accepts the following input properties:

PortId
This property is required.
Changes to this property will trigger replacement.
string
UUID of the Connection Port where the VC is scoped to
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
UUID of the Project where the VC is scoped to
ConnectionId Changes to this property will trigger replacement. string
UUID of Connection where the VC is scoped to. Only used for dedicated connections
CustomerIp string
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
CustomerIpv6 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 resource
Md5 string
The password that can be set for the VRF BGP peer
MetalIp string
The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet.
MetalIpv6 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 resource
NniVlan Changes to this property will trigger replacement. int
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
PeerAsn Changes to this property will trigger replacement. int
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 metalip and customerip. * 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.
SubnetIpv6 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 metalip and customerip. * 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<string>
Tags attached to the virtual circuit
VirtualCircuitId Changes to this property will trigger replacement. string
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
VlanId string
UUID of the VLAN to associate
VrfId Changes to this property will trigger replacement. string
UUID of the VRF to associate
PortId
This property is required.
Changes to this property will trigger replacement.
string
UUID of the Connection Port where the VC is scoped to
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
UUID of the Project where the VC is scoped to
ConnectionId Changes to this property will trigger replacement. string
UUID of Connection where the VC is scoped to. Only used for dedicated connections
CustomerIp string
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
CustomerIpv6 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 resource
Md5 string
The password that can be set for the VRF BGP peer
MetalIp string
The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet.
MetalIpv6 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 resource
NniVlan Changes to this property will trigger replacement. int
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
PeerAsn Changes to this property will trigger replacement. int
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 metalip and customerip. * 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.
SubnetIpv6 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 metalip and customerip. * 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 []string
Tags attached to the virtual circuit
VirtualCircuitId Changes to this property will trigger replacement. string
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
VlanId string
UUID of the VLAN to associate
VrfId Changes to this property will trigger replacement. string
UUID of the VRF to associate
portId
This property is required.
Changes to this property will trigger replacement.
String
UUID of the Connection Port where the VC is scoped to
projectId
This property is required.
Changes to this property will trigger replacement.
String
UUID of the Project where the VC is scoped to
connectionId Changes to this property will trigger replacement. String
UUID of Connection where the VC is scoped to. Only used for dedicated connections
customerIp String
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
customerIpv6 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 resource
md5 String
The password that can be set for the VRF BGP peer
metalIp String
The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet.
metalIpv6 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 resource
nniVlan Changes to this property will trigger replacement. Integer
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
peerAsn Changes to this property will trigger replacement. Integer
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 metalip and customerip. * 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.
subnetIpv6 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 metalip and customerip. * 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<String>
Tags attached to the virtual circuit
virtualCircuitId Changes to this property will trigger replacement. String
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
vlanId String
UUID of the VLAN to associate
vrfId Changes to this property will trigger replacement. String
UUID of the VRF to associate
portId
This property is required.
Changes to this property will trigger replacement.
string
UUID of the Connection Port where the VC is scoped to
projectId
This property is required.
Changes to this property will trigger replacement.
string
UUID of the Project where the VC is scoped to
connectionId Changes to this property will trigger replacement. string
UUID of Connection where the VC is scoped to. Only used for dedicated connections
customerIp string
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
customerIpv6 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 resource
md5 string
The password that can be set for the VRF BGP peer
metalIp string
The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet.
metalIpv6 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 resource
nniVlan Changes to this property will trigger replacement. number
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
peerAsn Changes to this property will trigger replacement. 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 metalip and customerip. * 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.
subnetIpv6 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 metalip and customerip. * 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 string[]
Tags attached to the virtual circuit
virtualCircuitId Changes to this property will trigger replacement. string
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
vlanId string
UUID of the VLAN to associate
vrfId Changes to this property will trigger replacement. string
UUID of the VRF to associate
port_id
This property is required.
Changes to this property will trigger replacement.
str
UUID of the Connection Port where the VC is scoped to
project_id
This property is required.
Changes to this property will trigger replacement.
str
UUID of the Project where the VC is scoped to
connection_id Changes to this property will trigger replacement. str
UUID of Connection where the VC is scoped to. Only used for dedicated connections
customer_ip str
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
customer_ipv6 str
The Customer IPv6 address which the CSR switch will peer with. Will default to the other usable IP in the IPv6 subnet.
description str
Description of the Virtual Circuit resource
md5 str
The password that can be set for the VRF BGP peer
metal_ip str
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 str
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 str
Name of the Virtual Circuit resource
nni_vlan Changes to this property will trigger replacement. int
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
peer_asn Changes to this property will trigger replacement. int
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 str
Description of the Virtual Circuit speed. This is for information purposes and is computed when the connection type is shared.
subnet str
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 metalip and customerip. * 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 str
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 metalip and customerip. * 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 Sequence[str]
Tags attached to the virtual circuit
virtual_circuit_id Changes to this property will trigger replacement. str
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
vlan_id str
UUID of the VLAN to associate
vrf_id Changes to this property will trigger replacement. str
UUID of the VRF to associate
portId
This property is required.
Changes to this property will trigger replacement.
String
UUID of the Connection Port where the VC is scoped to
projectId
This property is required.
Changes to this property will trigger replacement.
String
UUID of the Project where the VC is scoped to
connectionId Changes to this property will trigger replacement. String
UUID of Connection where the VC is scoped to. Only used for dedicated connections
customerIp String
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
customerIpv6 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 resource
md5 String
The password that can be set for the VRF BGP peer
metalIp String
The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet.
metalIpv6 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 resource
nniVlan Changes to this property will trigger replacement. Number
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
peerAsn Changes to this property will trigger replacement. 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 metalip and customerip. * 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.
subnetIpv6 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 metalip and customerip. * 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<String>
Tags attached to the virtual circuit
virtualCircuitId Changes to this property will trigger replacement. String
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
vlanId String
UUID of the VLAN to associate
vrfId Changes to this property will trigger replacement. String
UUID of the VRF to associate

Outputs

All input properties are implicitly available as output properties. Additionally, the VirtualCircuit resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
NniVnid int
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
Status string
Status of the virtual circuit resource
Vnid int
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
Id string
The provider-assigned unique ID for this managed resource.
NniVnid int
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
Status string
Status of the virtual circuit resource
Vnid int
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
id String
The provider-assigned unique ID for this managed resource.
nniVnid Integer
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
status String
Status of the virtual circuit resource
vnid Integer
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
id string
The provider-assigned unique ID for this managed resource.
nniVnid number
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
status string
Status of the virtual circuit resource
vnid number
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
id str
The provider-assigned unique ID for this managed resource.
nni_vnid int
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
status str
Status of the virtual circuit resource
vnid int
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
id String
The provider-assigned unique ID for this managed resource.
nniVnid Number
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
status String
Status of the virtual circuit resource
vnid Number
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/

Look up Existing VirtualCircuit Resource

Get an existing VirtualCircuit resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VirtualCircuitState, opts?: CustomResourceOptions): VirtualCircuit
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        connection_id: Optional[str] = None,
        customer_ip: Optional[str] = None,
        customer_ipv6: Optional[str] = None,
        description: Optional[str] = None,
        md5: Optional[str] = None,
        metal_ip: Optional[str] = None,
        metal_ipv6: Optional[str] = None,
        name: Optional[str] = None,
        nni_vlan: Optional[int] = None,
        nni_vnid: Optional[int] = None,
        peer_asn: Optional[int] = None,
        port_id: Optional[str] = None,
        project_id: Optional[str] = None,
        speed: Optional[str] = None,
        status: Optional[str] = None,
        subnet: Optional[str] = None,
        subnet_ipv6: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        virtual_circuit_id: Optional[str] = None,
        vlan_id: Optional[str] = None,
        vnid: Optional[int] = None,
        vrf_id: Optional[str] = None) -> VirtualCircuit
func GetVirtualCircuit(ctx *Context, name string, id IDInput, state *VirtualCircuitState, opts ...ResourceOption) (*VirtualCircuit, error)
public static VirtualCircuit Get(string name, Input<string> id, VirtualCircuitState? state, CustomResourceOptions? opts = null)
public static VirtualCircuit get(String name, Output<String> id, VirtualCircuitState state, CustomResourceOptions options)
resources:  _:    type: equinix:metal:VirtualCircuit    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ConnectionId Changes to this property will trigger replacement. string
UUID of Connection where the VC is scoped to. Only used for dedicated connections
CustomerIp string
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
CustomerIpv6 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 resource
Md5 string
The password that can be set for the VRF BGP peer
MetalIp string
The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet.
MetalIpv6 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 resource
NniVlan Changes to this property will trigger replacement. int
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
NniVnid int
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
PeerAsn Changes to this property will trigger replacement. int
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.
PortId Changes to this property will trigger replacement. string
UUID of the Connection Port where the VC is scoped to
ProjectId Changes to this property will trigger replacement. string
UUID of the Project where the VC is scoped to
Speed string
Description of the Virtual Circuit speed. This is for information purposes and is computed when the connection type is shared.
Status string
Status of the virtual circuit resource
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 metalip and customerip. * 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.
SubnetIpv6 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 metalip and customerip. * 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<string>
Tags attached to the virtual circuit
VirtualCircuitId Changes to this property will trigger replacement. string
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
VlanId string
UUID of the VLAN to associate
Vnid int
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
VrfId Changes to this property will trigger replacement. string
UUID of the VRF to associate
ConnectionId Changes to this property will trigger replacement. string
UUID of Connection where the VC is scoped to. Only used for dedicated connections
CustomerIp string
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
CustomerIpv6 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 resource
Md5 string
The password that can be set for the VRF BGP peer
MetalIp string
The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet.
MetalIpv6 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 resource
NniVlan Changes to this property will trigger replacement. int
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
NniVnid int
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
PeerAsn Changes to this property will trigger replacement. int
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.
PortId Changes to this property will trigger replacement. string
UUID of the Connection Port where the VC is scoped to
ProjectId Changes to this property will trigger replacement. string
UUID of the Project where the VC is scoped to
Speed string
Description of the Virtual Circuit speed. This is for information purposes and is computed when the connection type is shared.
Status string
Status of the virtual circuit resource
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 metalip and customerip. * 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.
SubnetIpv6 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 metalip and customerip. * 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 []string
Tags attached to the virtual circuit
VirtualCircuitId Changes to this property will trigger replacement. string
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
VlanId string
UUID of the VLAN to associate
Vnid int
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
VrfId Changes to this property will trigger replacement. string
UUID of the VRF to associate
connectionId Changes to this property will trigger replacement. String
UUID of Connection where the VC is scoped to. Only used for dedicated connections
customerIp String
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
customerIpv6 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 resource
md5 String
The password that can be set for the VRF BGP peer
metalIp String
The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet.
metalIpv6 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 resource
nniVlan Changes to this property will trigger replacement. Integer
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
nniVnid Integer
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
peerAsn Changes to this property will trigger replacement. Integer
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.
portId Changes to this property will trigger replacement. String
UUID of the Connection Port where the VC is scoped to
projectId Changes to this property will trigger replacement. String
UUID of the Project where the VC is scoped to
speed String
Description of the Virtual Circuit speed. This is for information purposes and is computed when the connection type is shared.
status String
Status of the virtual circuit resource
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 metalip and customerip. * 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.
subnetIpv6 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 metalip and customerip. * 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<String>
Tags attached to the virtual circuit
virtualCircuitId Changes to this property will trigger replacement. String
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
vlanId String
UUID of the VLAN to associate
vnid Integer
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
vrfId Changes to this property will trigger replacement. String
UUID of the VRF to associate
connectionId Changes to this property will trigger replacement. string
UUID of Connection where the VC is scoped to. Only used for dedicated connections
customerIp string
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
customerIpv6 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 resource
md5 string
The password that can be set for the VRF BGP peer
metalIp string
The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet.
metalIpv6 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 resource
nniVlan Changes to this property will trigger replacement. number
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
nniVnid number
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
peerAsn Changes to this property will trigger replacement. 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.
portId Changes to this property will trigger replacement. string
UUID of the Connection Port where the VC is scoped to
projectId Changes to this property will trigger replacement. string
UUID of the Project where the VC is scoped to
speed string
Description of the Virtual Circuit speed. This is for information purposes and is computed when the connection type is shared.
status string
Status of the virtual circuit resource
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 metalip and customerip. * 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.
subnetIpv6 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 metalip and customerip. * 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 string[]
Tags attached to the virtual circuit
virtualCircuitId Changes to this property will trigger replacement. string
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
vlanId string
UUID of the VLAN to associate
vnid number
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
vrfId Changes to this property will trigger replacement. string
UUID of the VRF to associate
connection_id Changes to this property will trigger replacement. str
UUID of Connection where the VC is scoped to. Only used for dedicated connections
customer_ip str
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
customer_ipv6 str
The Customer IPv6 address which the CSR switch will peer with. Will default to the other usable IP in the IPv6 subnet.
description str
Description of the Virtual Circuit resource
md5 str
The password that can be set for the VRF BGP peer
metal_ip str
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 str
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 str
Name of the Virtual Circuit resource
nni_vlan Changes to this property will trigger replacement. int
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
nni_vnid int
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
peer_asn Changes to this property will trigger replacement. int
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.
port_id Changes to this property will trigger replacement. str
UUID of the Connection Port where the VC is scoped to
project_id Changes to this property will trigger replacement. str
UUID of the Project where the VC is scoped to
speed str
Description of the Virtual Circuit speed. This is for information purposes and is computed when the connection type is shared.
status str
Status of the virtual circuit resource
subnet str
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 metalip and customerip. * 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 str
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 metalip and customerip. * 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 Sequence[str]
Tags attached to the virtual circuit
virtual_circuit_id Changes to this property will trigger replacement. str
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
vlan_id str
UUID of the VLAN to associate
vnid int
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
vrf_id Changes to this property will trigger replacement. str
UUID of the VRF to associate
connectionId Changes to this property will trigger replacement. String
UUID of Connection where the VC is scoped to. Only used for dedicated connections
customerIp String
The Customer IP address which the CSR switch will peer with. Will default to the other usable IP in the subnet.
customerIpv6 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 resource
md5 String
The password that can be set for the VRF BGP peer
metalIp String
The Metal IP address for the SVI (Switch Virtual Interface) of the VirtualCircuit. Will default to the first usable IP in the subnet.
metalIpv6 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 resource
nniVlan Changes to this property will trigger replacement. Number
Equinix Metal network-to-network VLAN ID (optional when the connection has mode=tunnel)
nniVnid Number
Nni VLAN ID parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
peerAsn Changes to this property will trigger replacement. 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.
portId Changes to this property will trigger replacement. String
UUID of the Connection Port where the VC is scoped to
projectId Changes to this property will trigger replacement. String
UUID of the Project where the VC is scoped to
speed String
Description of the Virtual Circuit speed. This is for information purposes and is computed when the connection type is shared.
status String
Status of the virtual circuit resource
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 metalip and customerip. * 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.
subnetIpv6 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 metalip and customerip. * 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<String>
Tags attached to the virtual circuit
virtualCircuitId Changes to this property will trigger replacement. String
UUID of an existing VC to configure. Used in the case of shared interconnections where the VC has already been created.
vlanId String
UUID of the VLAN to associate
vnid Number
VNID VLAN parameter, see https://deploy.equinix.com/developers/docs/metal/interconnections/introduction/
vrfId Changes to this property will trigger replacement. String
UUID of the VRF to associate

Package Details

Repository
equinix equinix/pulumi-equinix
License
Apache-2.0
Notes
This Pulumi package is based on the equinix Terraform Provider.