Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

Vlan

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

Example Usage

using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new VLAN in datacenter "ewr1"
        var vlan1 = new EquinixMetal.Vlan("vlan1", new EquinixMetal.VlanArgs
        {
            Description = "VLAN in New Jersey",
            Facility = "ewr1",
            ProjectId = local.Project_id,
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := equinix - metal.NewVlan(ctx, "vlan1", &equinix-metal.VlanArgs{
            Description: pulumi.String("VLAN in New Jersey"),
            Facility:    pulumi.String("ewr1"),
            ProjectId:   pulumi.Any(local.Project_id),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_equinix_metal as equinix_metal

# Create a new VLAN in datacenter "ewr1"
vlan1 = equinix_metal.Vlan("vlan1",
    description="VLAN in New Jersey",
    facility="ewr1",
    project_id=local["project_id"])
import * as pulumi from "@pulumi/pulumi";
import * as equinix_metal from "@pulumi/equinix-metal";

// Create a new VLAN in datacenter "ewr1"
const vlan1 = new equinix_metal.Vlan("vlan1", {
    description: "VLAN in New Jersey",
    facility: "ewr1",
    projectId: local.project_id,
});

Create a Vlan Resource

new Vlan(name: string, args: VlanArgs, opts?: CustomResourceOptions);
def Vlan(resource_name: str, opts: Optional[ResourceOptions] = None, description: Optional[str] = None, facility: Optional[Union[str, Facility]] = None, project_id: Optional[str] = None)
func NewVlan(ctx *Context, name string, args VlanArgs, opts ...ResourceOption) (*Vlan, error)
public Vlan(string name, VlanArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args VlanArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VlanArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VlanArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Vlan Resource Properties

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

Inputs

The Vlan resource accepts the following input properties:

Facility string | Pulumi.EquinixMetal.Facility

Facility where to create the VLAN

ProjectId string

ID of parent project

Description string

Description string

Facility string | Facility

Facility where to create the VLAN

ProjectId string

ID of parent project

Description string

Description string

facility string | Facility

Facility where to create the VLAN

projectId string

ID of parent project

description string

Description string

facility str | Facility

Facility where to create the VLAN

project_id str

ID of parent project

description str

Description string

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.
Vxlan int

VXLAN segment ID

Id string
The provider-assigned unique ID for this managed resource.
Vxlan int

VXLAN segment ID

id string
The provider-assigned unique ID for this managed resource.
vxlan number

VXLAN segment ID

id str
The provider-assigned unique ID for this managed resource.
vxlan int

VXLAN segment ID

Look up an 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, 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)
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.

The following state arguments are supported:

Description string

Description string

Facility string | Pulumi.EquinixMetal.Facility

Facility where to create the VLAN

ProjectId string

ID of parent project

Vxlan int

VXLAN segment ID

Description string

Description string

Facility string | Facility

Facility where to create the VLAN

ProjectId string

ID of parent project

Vxlan int

VXLAN segment ID

description string

Description string

facility string | Facility

Facility where to create the VLAN

projectId string

ID of parent project

vxlan number

VXLAN segment ID

description str

Description string

facility str | Facility

Facility where to create the VLAN

project_id str

ID of parent project

vxlan int

VXLAN segment ID

Supporting Types

Facility

EWR1
ewr1
SJC1
sjc1
DFW1
dfw1
DFW2
dfw2
AMS1
ams1
NRT1
nrt1
SEA1
sea1
LAX1
lax1
ORD1
ord1
ATL1
atl1
IAD1
iad1
SIN1
sin1
HKG1
hkg1
SYD1
syd1
MRS1
mrs1
YYZ1
yyz1
FRA2
fra2
AM6
am6
DC13
dc13
CH3
ch3
DA3
da3
DA11
da11
LA4
la4
NY5
ny5
SG1
sg1
SV15
sv15
FacilityEWR1
ewr1
FacilitySJC1
sjc1
FacilityDFW1
dfw1
FacilityDFW2
dfw2
FacilityAMS1
ams1
FacilityNRT1
nrt1
FacilitySEA1
sea1
FacilityLAX1
lax1
FacilityORD1
ord1
FacilityATL1
atl1
FacilityIAD1
iad1
FacilitySIN1
sin1
FacilityHKG1
hkg1
FacilitySYD1
syd1
FacilityMRS1
mrs1
FacilityYYZ1
yyz1
FacilityFRA2
fra2
FacilityAM6
am6
FacilityDC13
dc13
FacilityCH3
ch3
FacilityDA3
da3
FacilityDA11
da11
FacilityLA4
la4
FacilityNY5
ny5
FacilitySG1
sg1
FacilitySV15
sv15
EWR1
ewr1
SJC1
sjc1
DFW1
dfw1
DFW2
dfw2
AMS1
ams1
NRT1
nrt1
SEA1
sea1
LAX1
lax1
ORD1
ord1
ATL1
atl1
IAD1
iad1
SIN1
sin1
HKG1
hkg1
SYD1
syd1
MRS1
mrs1
YYZ1
yyz1
FRA2
fra2
AM6
am6
DC13
dc13
CH3
ch3
DA3
da3
DA11
da11
LA4
la4
NY5
ny5
SG1
sg1
SV15
sv15
EWR1
ewr1
SJC1
sjc1
DFW1
dfw1
DFW2
dfw2
AMS1
ams1
NRT1
nrt1
SEA1
sea1
LAX1
lax1
ORD1
ord1
ATL1
atl1
IAD1
iad1
SIN1
sin1
HKG1
hkg1
SYD1
syd1
MRS1
mrs1
YYZ1
yyz1
FRA2
fra2
AM6
am6
DC13
dc13
CH3
ch3
DA3
da3
DA11
da11
LA4
la4
NY5
ny5
SG1
sg1
SV15
sv15

Package Details

Repository
https://github.com/pulumi/pulumi-equinix-metal
License
Apache-2.0
Notes
This Pulumi package is based on the metal Terraform Provider.