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

equinix.metal.Vlan

Explore with Pulumi AI

Provides a resource to allow users to manage Virtual Networks in their projects.

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

  • https://metal.equinix.com/developers/docs/networking/layer2/
  • https://metal.equinix.com/developers/docs/networking/layer2-configs/

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var vlan1 = new Equinix.Metal.Vlan("vlan1", new()
    {
        Description = "VLAN in New Jersey",
        Metro = "sv",
        ProjectId = projectId,
        Vxlan = 1040,
    });

});
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 {
		_, err := metal.NewVlan(ctx, "vlan1", &metal.VlanArgs{
			Description: pulumi.String("VLAN in New Jersey"),
			Metro:       pulumi.String("sv"),
			ProjectId:   pulumi.Any(projectId),
			Vxlan:       pulumi.Int(1040),
		})
		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.Vlan;
import com.pulumi.equinix.metal.VlanArgs;
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) {
        var vlan1 = new Vlan("vlan1", VlanArgs.builder()
            .description("VLAN in New Jersey")
            .metro("sv")
            .projectId(projectId)
            .vxlan(1040)
            .build());

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

const vlan1 = new equinix.metal.Vlan("vlan1", {
    description: "VLAN in New Jersey",
    metro: "sv",
    projectId: projectId,
    vxlan: 1040,
});
Copy
import pulumi
import pulumi_equinix as equinix

vlan1 = equinix.metal.Vlan("vlan1",
    description="VLAN in New Jersey",
    metro="sv",
    project_id=project_id,
    vxlan=1040)
Copy
resources:
  # Create a new VLAN in metro "esv"
  vlan1:
    type: equinix:metal:Vlan
    properties:
      description: VLAN in New Jersey
      metro: sv
      projectId: ${projectId}
      vxlan: 1040
Copy

Create Vlan Resource

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

Constructor syntax

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

@overload
def Vlan(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         project_id: Optional[str] = None,
         description: Optional[str] = None,
         facility: Optional[Union[str, Facility]] = None,
         metro: Optional[str] = None,
         vxlan: Optional[int] = None)
func NewVlan(ctx *Context, name string, args VlanArgs, opts ...ResourceOption) (*Vlan, error)
public Vlan(string name, VlanArgs args, CustomResourceOptions? opts = null)
public Vlan(String name, VlanArgs args)
public Vlan(String name, VlanArgs args, CustomResourceOptions options)
type: equinix:metal:Vlan
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. VlanArgs
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. VlanArgs
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. VlanArgs
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. VlanArgs
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. VlanArgs
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 vlanResource = new Equinix.Metal.Vlan("vlanResource", new()
{
    ProjectId = "string",
    Description = "string",
    Metro = "string",
    Vxlan = 0,
});
Copy
example, err := metal.NewVlan(ctx, "vlanResource", &metal.VlanArgs{
	ProjectId:   pulumi.String("string"),
	Description: pulumi.String("string"),
	Metro:       pulumi.String("string"),
	Vxlan:       pulumi.Int(0),
})
Copy
var vlanResource = new Vlan("vlanResource", VlanArgs.builder()
    .projectId("string")
    .description("string")
    .metro("string")
    .vxlan(0)
    .build());
Copy
vlan_resource = equinix.metal.Vlan("vlanResource",
    project_id="string",
    description="string",
    metro="string",
    vxlan=0)
Copy
const vlanResource = new equinix.metal.Vlan("vlanResource", {
    projectId: "string",
    description: "string",
    metro: "string",
    vxlan: 0,
});
Copy
type: equinix:metal:Vlan
properties:
    description: string
    metro: string
    projectId: string
    vxlan: 0
Copy

Vlan 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 Vlan resource accepts the following input properties:

ProjectId This property is required. string
ID of parent project.
Description string
Description string.
Facility string | Pulumi.Equinix.Metal.Facility
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

Metro string
Metro in which to create the VLAN
Vxlan int
VLAN ID, must be unique in metro.
ProjectId This property is required. string
ID of parent project.
Description string
Description string.
Facility string | Facility
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

Metro string
Metro in which to create the VLAN
Vxlan int
VLAN ID, must be unique in metro.
projectId This property is required. String
ID of parent project.
description String
Description string.
facility String | Facility
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

metro String
Metro in which to create the VLAN
vxlan Integer
VLAN ID, must be unique in metro.
projectId This property is required. string
ID of parent project.
description string
Description string.
facility string | Facility
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

metro string
Metro in which to create the VLAN
vxlan number
VLAN ID, must be unique in metro.
project_id This property is required. str
ID of parent project.
description str
Description string.
facility str | Facility
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

metro str
Metro in which to create the VLAN
vxlan int
VLAN ID, must be unique in metro.
projectId This property is required. String
ID of parent project.
description String
Description string.
facility String | "am2" | "am6" | "ma5" | "nrt1" | "pa4" | "sk2" | "me2" | "hk2" | "ty11" | "la4" | "da6" | "da11" | "da3" | "sp4" | "mt1" | "sv16" | "sjc1" | "fra2" | "fr8" | "ny5" | "ny6" | "ny7" | "ch3" | "sl1" | "sy5" | "os3" | "ld7" | "dc10" | "ams1" | "sg4" | "se4" | "sy4" | "at4" | "dfw2" | "tr2" | "dc13" | "he7" | "ewr1" | "sg5" | "sg1" | "md2" | "sv15"
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

metro String
Metro in which to create the VLAN
vxlan Number
VLAN ID, must be unique in metro.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Vlan Resource

Get an existing Vlan 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?: VlanState, opts?: CustomResourceOptions): Vlan
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        facility: Optional[Union[str, Facility]] = None,
        metro: Optional[str] = None,
        project_id: Optional[str] = None,
        vxlan: Optional[int] = None) -> Vlan
func GetVlan(ctx *Context, name string, id IDInput, state *VlanState, opts ...ResourceOption) (*Vlan, error)
public static Vlan Get(string name, Input<string> id, VlanState? state, CustomResourceOptions? opts = null)
public static Vlan get(String name, Output<String> id, VlanState state, CustomResourceOptions options)
resources:  _:    type: equinix:metal:Vlan    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:
Description string
Description string.
Facility string | Pulumi.Equinix.Metal.Facility
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

Metro string
Metro in which to create the VLAN
ProjectId string
ID of parent project.
Vxlan int
VLAN ID, must be unique in metro.
Description string
Description string.
Facility string | Facility
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

Metro string
Metro in which to create the VLAN
ProjectId string
ID of parent project.
Vxlan int
VLAN ID, must be unique in metro.
description String
Description string.
facility String | Facility
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

metro String
Metro in which to create the VLAN
projectId String
ID of parent project.
vxlan Integer
VLAN ID, must be unique in metro.
description string
Description string.
facility string | Facility
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

metro string
Metro in which to create the VLAN
projectId string
ID of parent project.
vxlan number
VLAN ID, must be unique in metro.
description str
Description string.
facility str | Facility
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

metro str
Metro in which to create the VLAN
project_id str
ID of parent project.
vxlan int
VLAN ID, must be unique in metro.
description String
Description string.
facility String | "am2" | "am6" | "ma5" | "nrt1" | "pa4" | "sk2" | "me2" | "hk2" | "ty11" | "la4" | "da6" | "da11" | "da3" | "sp4" | "mt1" | "sv16" | "sjc1" | "fra2" | "fr8" | "ny5" | "ny6" | "ny7" | "ch3" | "sl1" | "sy5" | "os3" | "ld7" | "dc10" | "ams1" | "sg4" | "se4" | "sy4" | "at4" | "dfw2" | "tr2" | "dc13" | "he7" | "ewr1" | "sg5" | "sg1" | "md2" | "sv15"
Facility where to create the VLAN. Use metro instead; read the facility to metro migration guide

Deprecated: Use metro instead of facility. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices

metro String
Metro in which to create the VLAN
projectId String
ID of parent project.
vxlan Number
VLAN ID, must be unique in metro.

Supporting Types

Facility
, FacilityArgs

AM2
am2Amsterdam 2
AM6
am6Amsterdam 6
MA5
ma5Manchester 5
NRT1
nrt1Tokio 1
PA4
pa4Paris 4
SK2
sk2Stockholm 2
ME2
me2Melbourne 2
HK2
hk2Hong Kong 2
TY11
ty11Tokyo 11
LA4
la4Los Angeles 4
DA6
da6Dallas 6
DA11
da11Dallas 11
DA3
da3Dallas 3
SP4
sp4Sao Paulo 4
MT1
mt1Montreal 1
SV16
sv16Silicon Valley 16
SJC1
sjc1Sunnyvale, CA 1
FRA2
fra2Frankfurt 2
FRA8
fr8Frankfurt 8
NY5
ny5New York 5
NY6
ny6New York 6
NY7
ny7New York 7
CH3
ch3Chicago 3
SL1
sl1Seoul 1
SY5
sy5Sydney 5
OS3
os3Osaka 3
LD7
ld7London 7
DC10
dc10Washington DC 10
AMS1
ams1Amsterdam 1
SG4
sg4Singapore 4
SE4
se4Seattle 4
SY4
sy4Sydney 4
AT4
at4Atlanta 4
DFW2
dfw2Dallas 2
TR2
tr2Toronto
DC13
dc13Washington DC
HE7
he7Helsinki
EWR1
ewr1Parsippany, NJ 1
SG5
sg5Singapore 5
SG1
sg1Singapore 1
MD2
md2Madrid 2
SV15
sv15Silicon Valley 15
FacilityAM2
am2Amsterdam 2
FacilityAM6
am6Amsterdam 6
FacilityMA5
ma5Manchester 5
FacilityNRT1
nrt1Tokio 1
FacilityPA4
pa4Paris 4
FacilitySK2
sk2Stockholm 2
FacilityME2
me2Melbourne 2
FacilityHK2
hk2Hong Kong 2
FacilityTY11
ty11Tokyo 11
FacilityLA4
la4Los Angeles 4
FacilityDA6
da6Dallas 6
FacilityDA11
da11Dallas 11
FacilityDA3
da3Dallas 3
FacilitySP4
sp4Sao Paulo 4
FacilityMT1
mt1Montreal 1
FacilitySV16
sv16Silicon Valley 16
FacilitySJC1
sjc1Sunnyvale, CA 1
FacilityFRA2
fra2Frankfurt 2
FacilityFRA8
fr8Frankfurt 8
FacilityNY5
ny5New York 5
FacilityNY6
ny6New York 6
FacilityNY7
ny7New York 7
FacilityCH3
ch3Chicago 3
FacilitySL1
sl1Seoul 1
FacilitySY5
sy5Sydney 5
FacilityOS3
os3Osaka 3
FacilityLD7
ld7London 7
FacilityDC10
dc10Washington DC 10
FacilityAMS1
ams1Amsterdam 1
FacilitySG4
sg4Singapore 4
FacilitySE4
se4Seattle 4
FacilitySY4
sy4Sydney 4
FacilityAT4
at4Atlanta 4
FacilityDFW2
dfw2Dallas 2
FacilityTR2
tr2Toronto
FacilityDC13
dc13Washington DC
FacilityHE7
he7Helsinki
FacilityEWR1
ewr1Parsippany, NJ 1
FacilitySG5
sg5Singapore 5
FacilitySG1
sg1Singapore 1
FacilityMD2
md2Madrid 2
FacilitySV15
sv15Silicon Valley 15
AM2
am2Amsterdam 2
AM6
am6Amsterdam 6
MA5
ma5Manchester 5
NRT1
nrt1Tokio 1
PA4
pa4Paris 4
SK2
sk2Stockholm 2
ME2
me2Melbourne 2
HK2
hk2Hong Kong 2
TY11
ty11Tokyo 11
LA4
la4Los Angeles 4
DA6
da6Dallas 6
DA11
da11Dallas 11
DA3
da3Dallas 3
SP4
sp4Sao Paulo 4
MT1
mt1Montreal 1
SV16
sv16Silicon Valley 16
SJC1
sjc1Sunnyvale, CA 1
FRA2
fra2Frankfurt 2
FRA8
fr8Frankfurt 8
NY5
ny5New York 5
NY6
ny6New York 6
NY7
ny7New York 7
CH3
ch3Chicago 3
SL1
sl1Seoul 1
SY5
sy5Sydney 5
OS3
os3Osaka 3
LD7
ld7London 7
DC10
dc10Washington DC 10
AMS1
ams1Amsterdam 1
SG4
sg4Singapore 4
SE4
se4Seattle 4
SY4
sy4Sydney 4
AT4
at4Atlanta 4
DFW2
dfw2Dallas 2
TR2
tr2Toronto
DC13
dc13Washington DC
HE7
he7Helsinki
EWR1
ewr1Parsippany, NJ 1
SG5
sg5Singapore 5
SG1
sg1Singapore 1
MD2
md2Madrid 2
SV15
sv15Silicon Valley 15
AM2
am2Amsterdam 2
AM6
am6Amsterdam 6
MA5
ma5Manchester 5
NRT1
nrt1Tokio 1
PA4
pa4Paris 4
SK2
sk2Stockholm 2
ME2
me2Melbourne 2
HK2
hk2Hong Kong 2
TY11
ty11Tokyo 11
LA4
la4Los Angeles 4
DA6
da6Dallas 6
DA11
da11Dallas 11
DA3
da3Dallas 3
SP4
sp4Sao Paulo 4
MT1
mt1Montreal 1
SV16
sv16Silicon Valley 16
SJC1
sjc1Sunnyvale, CA 1
FRA2
fra2Frankfurt 2
FRA8
fr8Frankfurt 8
NY5
ny5New York 5
NY6
ny6New York 6
NY7
ny7New York 7
CH3
ch3Chicago 3
SL1
sl1Seoul 1
SY5
sy5Sydney 5
OS3
os3Osaka 3
LD7
ld7London 7
DC10
dc10Washington DC 10
AMS1
ams1Amsterdam 1
SG4
sg4Singapore 4
SE4
se4Seattle 4
SY4
sy4Sydney 4
AT4
at4Atlanta 4
DFW2
dfw2Dallas 2
TR2
tr2Toronto
DC13
dc13Washington DC
HE7
he7Helsinki
EWR1
ewr1Parsippany, NJ 1
SG5
sg5Singapore 5
SG1
sg1Singapore 1
MD2
md2Madrid 2
SV15
sv15Silicon Valley 15
AM2
am2Amsterdam 2
AM6
am6Amsterdam 6
MA5
ma5Manchester 5
NRT1
nrt1Tokio 1
PA4
pa4Paris 4
SK2
sk2Stockholm 2
ME2
me2Melbourne 2
HK2
hk2Hong Kong 2
TY11
ty11Tokyo 11
LA4
la4Los Angeles 4
DA6
da6Dallas 6
DA11
da11Dallas 11
DA3
da3Dallas 3
SP4
sp4Sao Paulo 4
MT1
mt1Montreal 1
SV16
sv16Silicon Valley 16
SJC1
sjc1Sunnyvale, CA 1
FRA2
fra2Frankfurt 2
FRA8
fr8Frankfurt 8
NY5
ny5New York 5
NY6
ny6New York 6
NY7
ny7New York 7
CH3
ch3Chicago 3
SL1
sl1Seoul 1
SY5
sy5Sydney 5
OS3
os3Osaka 3
LD7
ld7London 7
DC10
dc10Washington DC 10
AMS1
ams1Amsterdam 1
SG4
sg4Singapore 4
SE4
se4Seattle 4
SY4
sy4Sydney 4
AT4
at4Atlanta 4
DFW2
dfw2Dallas 2
TR2
tr2Toronto
DC13
dc13Washington DC
HE7
he7Helsinki
EWR1
ewr1Parsippany, NJ 1
SG5
sg5Singapore 5
SG1
sg1Singapore 1
MD2
md2Madrid 2
SV15
sv15Silicon Valley 15
"am2"
am2Amsterdam 2
"am6"
am6Amsterdam 6
"ma5"
ma5Manchester 5
"nrt1"
nrt1Tokio 1
"pa4"
pa4Paris 4
"sk2"
sk2Stockholm 2
"me2"
me2Melbourne 2
"hk2"
hk2Hong Kong 2
"ty11"
ty11Tokyo 11
"la4"
la4Los Angeles 4
"da6"
da6Dallas 6
"da11"
da11Dallas 11
"da3"
da3Dallas 3
"sp4"
sp4Sao Paulo 4
"mt1"
mt1Montreal 1
"sv16"
sv16Silicon Valley 16
"sjc1"
sjc1Sunnyvale, CA 1
"fra2"
fra2Frankfurt 2
"fr8"
fr8Frankfurt 8
"ny5"
ny5New York 5
"ny6"
ny6New York 6
"ny7"
ny7New York 7
"ch3"
ch3Chicago 3
"sl1"
sl1Seoul 1
"sy5"
sy5Sydney 5
"os3"
os3Osaka 3
"ld7"
ld7London 7
"dc10"
dc10Washington DC 10
"ams1"
ams1Amsterdam 1
"sg4"
sg4Singapore 4
"se4"
se4Seattle 4
"sy4"
sy4Sydney 4
"at4"
at4Atlanta 4
"dfw2"
dfw2Dallas 2
"tr2"
tr2Toronto
"dc13"
dc13Washington DC
"he7"
he7Helsinki
"ewr1"
ewr1Parsippany, NJ 1
"sg5"
sg5Singapore 5
"sg1"
sg1Singapore 1
"md2"
md2Madrid 2
"sv15"
sv15Silicon Valley 15

Package Details

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