equinix-metal logo
Equinix Metal v3.2.1, Dec 30 21

equinix-metal.VirtualCircuit

Explore with Pulumi AI

Use this resource to associate VLAN with a Dedicated Port from Equinix Fabric - software-defined interconnections.

Example Usage

Pick an existing Project and Connection, create a VLAN and use

using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;

class MyStack : Stack
{
    public MyStack()
    {
        var projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c";
        var connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0";
        var testConnection = Output.Create(EquinixMetal.GetConnection.InvokeAsync(new EquinixMetal.GetConnectionArgs
        {
            ConnectionId = connId,
        }));
        var testVlan = new EquinixMetal.Vlan("testVlan", new EquinixMetal.VlanArgs
        {
            ProjectId = projectId,
            Metro = testConnection.Apply(testConnection => testConnection.Metro),
        });
        var testVirtualCircuit = new EquinixMetal.VirtualCircuit("testVirtualCircuit", new EquinixMetal.VirtualCircuitArgs
        {
            ConnectionId = connId,
            ProjectId = projectId,
            PortId = testConnection.Apply(testConnection => testConnection.Ports?[0]?.Id),
            VlanId = testVlan.Id,
            NniVlan = 1056,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-equinix-metal/sdk/v3/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"
		testConnection, err := equinix - metal.LookupConnection(ctx, &GetConnectionArgs{
			ConnectionId: connId,
		}, nil)
		if err != nil {
			return err
		}
		testVlan, err := equinix - metal.NewVlan(ctx, "testVlan", &equinix-metal.VlanArgs{
			ProjectId: pulumi.String(projectId),
			Metro:     pulumi.String(testConnection.Metro),
		})
		if err != nil {
			return err
		}
		_, err = equinix - metal.NewVirtualCircuit(ctx, "testVirtualCircuit", &equinix-metal.VirtualCircuitArgs{
			ConnectionId: pulumi.String(connId),
			ProjectId:    pulumi.String(projectId),
			PortId:       pulumi.String(testConnection.Ports[0].Id),
			VlanId:       testVlan.ID(),
			NniVlan:      pulumi.Int(1056),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_equinix_metal as equinix_metal

project_id = "52000fb2-ee46-4673-93a8-de2c2bdba33c"
conn_id = "73f12f29-3e19-43a0-8e90-ae81580db1e0"
test_connection = equinix_metal.get_connection(connection_id=conn_id)
test_vlan = equinix_metal.Vlan("testVlan",
    project_id=project_id,
    metro=test_connection.metro)
test_virtual_circuit = equinix_metal.VirtualCircuit("testVirtualCircuit",
    connection_id=conn_id,
    project_id=project_id,
    port_id=test_connection.ports[0].id,
    vlan_id=test_vlan.id,
    nni_vlan=1056)
import * as pulumi from "@pulumi/pulumi";
import * as equinix_metal from "@pulumi/equinix-metal";

const projectId = "52000fb2-ee46-4673-93a8-de2c2bdba33c";
const connId = "73f12f29-3e19-43a0-8e90-ae81580db1e0";
const testConnection = equinix_metal.getConnection({
    connectionId: connId,
});
const testVlan = new equinix_metal.Vlan("testVlan", {
    projectId: projectId,
    metro: testConnection.then(testConnection => testConnection.metro),
});
const testVirtualCircuit = new equinix_metal.VirtualCircuit("testVirtualCircuit", {
    connectionId: connId,
    projectId: projectId,
    portId: testConnection.then(testConnection => testConnection.ports?[0]?.id),
    vlanId: testVlan.id,
    nniVlan: 1056,
});

Coming soon!

Create VirtualCircuit Resource

new VirtualCircuit(name: string, args: VirtualCircuitArgs, opts?: CustomResourceOptions);
@overload
def VirtualCircuit(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   connection_id: Optional[str] = None,
                   description: Optional[str] = None,
                   name: Optional[str] = None,
                   nni_vlan: Optional[int] = None,
                   port_id: Optional[str] = None,
                   project_id: Optional[str] = None,
                   speed: Optional[str] = None,
                   tags: Optional[Sequence[str]] = None,
                   vlan_id: Optional[str] = None)
@overload
def VirtualCircuit(resource_name: str,
                   args: VirtualCircuitArgs,
                   opts: Optional[ResourceOptions] = 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.

name string
The unique name of the resource.
args VirtualCircuitArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args 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 string
The unique name of the resource.
args VirtualCircuitArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VirtualCircuitArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args VirtualCircuitArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The VirtualCircuit resource accepts the following input properties:

ConnectionId string

UUID of Connection where the VC is scoped to

PortId string

UUID of the Connection Port where the VC is scoped to

ProjectId string

UUID of the Project where the VC is scoped to

VlanId string

UUID of the VLAN to associate

Description string

Description for the Virtual Circuit resource

Name string

Name of the Virtual Circuit resource

NniVlan int

Equinix Metal network-to-network VLAN ID

Speed string

Speed of the Virtual Circuit resource

Tags List<string>

Tags for the Virtual Circuit resource

ConnectionId string

UUID of Connection where the VC is scoped to

PortId string

UUID of the Connection Port where the VC is scoped to

ProjectId string

UUID of the Project where the VC is scoped to

VlanId string

UUID of the VLAN to associate

Description string

Description for the Virtual Circuit resource

Name string

Name of the Virtual Circuit resource

NniVlan int

Equinix Metal network-to-network VLAN ID

Speed string

Speed of the Virtual Circuit resource

Tags []string

Tags for the Virtual Circuit resource

connectionId String

UUID of Connection where the VC is scoped to

portId String

UUID of the Connection Port where the VC is scoped to

projectId String

UUID of the Project where the VC is scoped to

vlanId String

UUID of the VLAN to associate

description String

Description for the Virtual Circuit resource

name String

Name of the Virtual Circuit resource

nniVlan Integer

Equinix Metal network-to-network VLAN ID

speed String

Speed of the Virtual Circuit resource

tags List<String>

Tags for the Virtual Circuit resource

connectionId string

UUID of Connection where the VC is scoped to

portId string

UUID of the Connection Port where the VC is scoped to

projectId string

UUID of the Project where the VC is scoped to

vlanId string

UUID of the VLAN to associate

description string

Description for the Virtual Circuit resource

name string

Name of the Virtual Circuit resource

nniVlan number

Equinix Metal network-to-network VLAN ID

speed string

Speed of the Virtual Circuit resource

tags string[]

Tags for the Virtual Circuit resource

connection_id str

UUID of Connection where the VC is scoped to

port_id str

UUID of the Connection Port where the VC is scoped to

project_id str

UUID of the Project where the VC is scoped to

vlan_id str

UUID of the VLAN to associate

description str

Description for the Virtual Circuit resource

name str

Name of the Virtual Circuit resource

nni_vlan int

Equinix Metal network-to-network VLAN ID

speed str

Speed of the Virtual Circuit resource

tags Sequence[str]

Tags for the Virtual Circuit resource

connectionId String

UUID of Connection where the VC is scoped to

portId String

UUID of the Connection Port where the VC is scoped to

projectId String

UUID of the Project where the VC is scoped to

vlanId String

UUID of the VLAN to associate

description String

Description for the Virtual Circuit resource

name String

Name of the Virtual Circuit resource

nniVlan Number

Equinix Metal network-to-network VLAN ID

speed String

Speed of the Virtual Circuit resource

tags List<String>

Tags for the Virtual Circuit resource

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://metal.equinix.com/developers/docs/networking/fabric/

Status string

Status of the virtal circuit

  • vnid
Vnid int

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

Id string

The provider-assigned unique ID for this managed resource.

NniVnid int

Nni VLAN ID parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

Status string

Status of the virtal circuit

  • vnid
Vnid int

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

id String

The provider-assigned unique ID for this managed resource.

nniVnid Integer

Nni VLAN ID parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

status String

Status of the virtal circuit

  • vnid
vnid Integer

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

id string

The provider-assigned unique ID for this managed resource.

nniVnid number

Nni VLAN ID parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

status string

Status of the virtal circuit

  • vnid
vnid number

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

id str

The provider-assigned unique ID for this managed resource.

nni_vnid int

Nni VLAN ID parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

status str

Status of the virtal circuit

  • vnid
vnid int

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

id String

The provider-assigned unique ID for this managed resource.

nniVnid Number

Nni VLAN ID parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

status String

Status of the virtal circuit

  • vnid
vnid Number

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

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,
        description: Optional[str] = None,
        name: Optional[str] = None,
        nni_vlan: Optional[int] = None,
        nni_vnid: Optional[int] = None,
        port_id: Optional[str] = None,
        project_id: Optional[str] = None,
        speed: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        vlan_id: Optional[str] = None,
        vnid: Optional[int] = 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)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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 string

UUID of Connection where the VC is scoped to

Description string

Description for the Virtual Circuit resource

Name string

Name of the Virtual Circuit resource

NniVlan int

Equinix Metal network-to-network VLAN ID

NniVnid int

Nni VLAN ID parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

PortId string

UUID of the Connection Port where the VC is scoped to

ProjectId string

UUID of the Project where the VC is scoped to

Speed string

Speed of the Virtual Circuit resource

Status string

Status of the virtal circuit

  • vnid
Tags List<string>

Tags for the Virtual Circuit resource

VlanId string

UUID of the VLAN to associate

Vnid int

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

ConnectionId string

UUID of Connection where the VC is scoped to

Description string

Description for the Virtual Circuit resource

Name string

Name of the Virtual Circuit resource

NniVlan int

Equinix Metal network-to-network VLAN ID

NniVnid int

Nni VLAN ID parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

PortId string

UUID of the Connection Port where the VC is scoped to

ProjectId string

UUID of the Project where the VC is scoped to

Speed string

Speed of the Virtual Circuit resource

Status string

Status of the virtal circuit

  • vnid
Tags []string

Tags for the Virtual Circuit resource

VlanId string

UUID of the VLAN to associate

Vnid int

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

connectionId String

UUID of Connection where the VC is scoped to

description String

Description for the Virtual Circuit resource

name String

Name of the Virtual Circuit resource

nniVlan Integer

Equinix Metal network-to-network VLAN ID

nniVnid Integer

Nni VLAN ID parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

portId String

UUID of the Connection Port where the VC is scoped to

projectId String

UUID of the Project where the VC is scoped to

speed String

Speed of the Virtual Circuit resource

status String

Status of the virtal circuit

  • vnid
tags List<String>

Tags for the Virtual Circuit resource

vlanId String

UUID of the VLAN to associate

vnid Integer

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

connectionId string

UUID of Connection where the VC is scoped to

description string

Description for the Virtual Circuit resource

name string

Name of the Virtual Circuit resource

nniVlan number

Equinix Metal network-to-network VLAN ID

nniVnid number

Nni VLAN ID parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

portId string

UUID of the Connection Port where the VC is scoped to

projectId string

UUID of the Project where the VC is scoped to

speed string

Speed of the Virtual Circuit resource

status string

Status of the virtal circuit

  • vnid
tags string[]

Tags for the Virtual Circuit resource

vlanId string

UUID of the VLAN to associate

vnid number

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

connection_id str

UUID of Connection where the VC is scoped to

description str

Description for the Virtual Circuit resource

name str

Name of the Virtual Circuit resource

nni_vlan int

Equinix Metal network-to-network VLAN ID

nni_vnid int

Nni VLAN ID parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

port_id str

UUID of the Connection Port where the VC is scoped to

project_id str

UUID of the Project where the VC is scoped to

speed str

Speed of the Virtual Circuit resource

status str

Status of the virtal circuit

  • vnid
tags Sequence[str]

Tags for the Virtual Circuit resource

vlan_id str

UUID of the VLAN to associate

vnid int

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

connectionId String

UUID of Connection where the VC is scoped to

description String

Description for the Virtual Circuit resource

name String

Name of the Virtual Circuit resource

nniVlan Number

Equinix Metal network-to-network VLAN ID

nniVnid Number

Nni VLAN ID parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

portId String

UUID of the Connection Port where the VC is scoped to

projectId String

UUID of the Project where the VC is scoped to

speed String

Speed of the Virtual Circuit resource

status String

Status of the virtal circuit

  • vnid
tags List<String>

Tags for the Virtual Circuit resource

vlanId String

UUID of the VLAN to associate

vnid Number

VNID VLAN parameter, see https://metal.equinix.com/developers/docs/networking/fabric/

Package Details

Repository
Equinix Metal pulumi/pulumi-equinix-metal
License
Apache-2.0
Notes

This Pulumi package is based on the metal Terraform Provider.