1. Packages
  2. Equinix
  3. API Docs
  4. metal
  5. PortVlanAttachment
Equinix v0.13.0 published on Monday, Jul 22, 2024 by Equinix

equinix.metal.PortVlanAttachment

Explore with Pulumi AI

equinix logo
Equinix v0.13.0 published on Monday, Jul 22, 2024 by Equinix

    Provides a resource to attach device ports to VLANs.

    Device and VLAN must be in the same metro.

    If you need this resource to add the port back to bond on removal, set force_bond = true.

    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/

    Attribute Referece

    In addition to all arguments above, the following attributes are exported:

    • id - UUID of device port used in the assignment.
    • vlan_id - UUID of VLAN API resource.
    • port_id - UUID of device port.

    Example Usage

    example 1

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Equinix = Pulumi.Equinix;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Equinix.Metal.Vlan("test", new()
        {
            Description = "VLAN in New York",
            Metro = "ny",
            ProjectId = projectId,
        });
    
        var testDevice = new Equinix.Metal.Device("testDevice", new()
        {
            Hostname = "test",
            Plan = Equinix.Metal.Plan.C3SmallX86,
            Metro = "ny",
            OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04,
            BillingCycle = Equinix.Metal.BillingCycle.Hourly,
            ProjectId = projectId,
        });
    
        var testDeviceNetworkType = new Equinix.Metal.DeviceNetworkType("testDeviceNetworkType", new()
        {
            DeviceId = testDevice.Id,
            Type = "hybrid",
        });
    
        var testPortVlanAttachment = new Equinix.Metal.PortVlanAttachment("testPortVlanAttachment", new()
        {
            DeviceId = testDeviceNetworkType.Id,
            PortName = "eth1",
            VlanVnid = test.Vxlan,
        });
    
    });
    
    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 {
    		test, err := metal.NewVlan(ctx, "test", &metal.VlanArgs{
    			Description: pulumi.String("VLAN in New York"),
    			Metro:       pulumi.String("ny"),
    			ProjectId:   pulumi.Any(projectId),
    		})
    		if err != nil {
    			return err
    		}
    		testDevice, err := metal.NewDevice(ctx, "testDevice", &metal.DeviceArgs{
    			Hostname:        pulumi.String("test"),
    			Plan:            pulumi.String(metal.PlanC3SmallX86),
    			Metro:           pulumi.String("ny"),
    			OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04),
    			BillingCycle:    pulumi.String(metal.BillingCycleHourly),
    			ProjectId:       pulumi.Any(projectId),
    		})
    		if err != nil {
    			return err
    		}
    		testDeviceNetworkType, err := metal.NewDeviceNetworkType(ctx, "testDeviceNetworkType", &metal.DeviceNetworkTypeArgs{
    			DeviceId: testDevice.ID(),
    			Type:     pulumi.String("hybrid"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = metal.NewPortVlanAttachment(ctx, "testPortVlanAttachment", &metal.PortVlanAttachmentArgs{
    			DeviceId: testDeviceNetworkType.ID(),
    			PortName: pulumi.String("eth1"),
    			VlanVnid: test.Vxlan,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 com.pulumi.equinix.metal.Device;
    import com.pulumi.equinix.metal.DeviceArgs;
    import com.pulumi.equinix.metal.DeviceNetworkType;
    import com.pulumi.equinix.metal.DeviceNetworkTypeArgs;
    import com.pulumi.equinix.metal.PortVlanAttachment;
    import com.pulumi.equinix.metal.PortVlanAttachmentArgs;
    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 test = new Vlan("test", VlanArgs.builder()
                .description("VLAN in New York")
                .metro("ny")
                .projectId(projectId)
                .build());
    
            var testDevice = new Device("testDevice", DeviceArgs.builder()
                .hostname("test")
                .plan("c3.small.x86")
                .metro("ny")
                .operatingSystem("ubuntu_20_04")
                .billingCycle("hourly")
                .projectId(projectId)
                .build());
    
            var testDeviceNetworkType = new DeviceNetworkType("testDeviceNetworkType", DeviceNetworkTypeArgs.builder()
                .deviceId(testDevice.id())
                .type("hybrid")
                .build());
    
            var testPortVlanAttachment = new PortVlanAttachment("testPortVlanAttachment", PortVlanAttachmentArgs.builder()
                .deviceId(testDeviceNetworkType.id())
                .portName("eth1")
                .vlanVnid(test.vxlan())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_equinix as equinix
    
    test = equinix.metal.Vlan("test",
        description="VLAN in New York",
        metro="ny",
        project_id=project_id)
    test_device = equinix.metal.Device("testDevice",
        hostname="test",
        plan=equinix.metal.Plan.C3_SMALL_X86,
        metro="ny",
        operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
        billing_cycle=equinix.metal.BillingCycle.HOURLY,
        project_id=project_id)
    test_device_network_type = equinix.metal.DeviceNetworkType("testDeviceNetworkType",
        device_id=test_device.id,
        type="hybrid")
    test_port_vlan_attachment = equinix.metal.PortVlanAttachment("testPortVlanAttachment",
        device_id=test_device_network_type.id,
        port_name="eth1",
        vlan_vnid=test.vxlan)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as equinix from "@equinix-labs/pulumi-equinix";
    
    const test = new equinix.metal.Vlan("test", {
        description: "VLAN in New York",
        metro: "ny",
        projectId: projectId,
    });
    const testDevice = new equinix.metal.Device("testDevice", {
        hostname: "test",
        plan: equinix.metal.Plan.C3SmallX86,
        metro: "ny",
        operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,
        billingCycle: equinix.metal.BillingCycle.Hourly,
        projectId: projectId,
    });
    const testDeviceNetworkType = new equinix.metal.DeviceNetworkType("testDeviceNetworkType", {
        deviceId: testDevice.id,
        type: "hybrid",
    });
    const testPortVlanAttachment = new equinix.metal.PortVlanAttachment("testPortVlanAttachment", {
        deviceId: testDeviceNetworkType.id,
        portName: "eth1",
        vlanVnid: test.vxlan,
    });
    
      test:
        type: equinix:metal:Vlan
        properties:
          description: VLAN in New York
          metro: ny
          projectId: ${projectId}
      testDevice:
        type: equinix:metal:Device
        name: test
        properties:
          hostname: test
          plan: c3.small.x86
          metro: ny
          operatingSystem: ubuntu_20_04
          billingCycle: hourly
          projectId: ${projectId}
      testDeviceNetworkType:
        type: equinix:metal:DeviceNetworkType
        name: test
        properties:
          deviceId: ${testDevice.id}
          type: hybrid
      testPortVlanAttachment:
        type: equinix:metal:PortVlanAttachment
        name: test
        properties:
          deviceId: ${testDeviceNetworkType.id}
          portName: eth1
          vlanVnid: ${test.vxlan}
    

    example 2

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Equinix = Pulumi.Equinix;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Equinix.Metal.Device("test", new()
        {
            Hostname = "test",
            Plan = Equinix.Metal.Plan.C3SmallX86,
            Metro = "ny",
            OperatingSystem = Equinix.Metal.OperatingSystem.Ubuntu20_04,
            BillingCycle = Equinix.Metal.BillingCycle.Hourly,
            ProjectId = projectId,
        });
    
        var testDeviceNetworkType = new Equinix.Metal.DeviceNetworkType("testDeviceNetworkType", new()
        {
            DeviceId = test.Id,
            Type = "layer2-individual",
        });
    
        var test1 = new Equinix.Metal.Vlan("test1", new()
        {
            Description = "VLAN in New York",
            Metro = "ny",
            ProjectId = projectId,
        });
    
        var test2 = new Equinix.Metal.Vlan("test2", new()
        {
            Description = "VLAN in New Jersey",
            Metro = "ny",
            ProjectId = projectId,
        });
    
        var test1PortVlanAttachment = new Equinix.Metal.PortVlanAttachment("test1PortVlanAttachment", new()
        {
            DeviceId = testDeviceNetworkType.Id,
            VlanVnid = test1.Vxlan,
            PortName = "eth1",
        });
    
        var test2PortVlanAttachment = new Equinix.Metal.PortVlanAttachment("test2PortVlanAttachment", new()
        {
            DeviceId = testDeviceNetworkType.Id,
            VlanVnid = test2.Vxlan,
            PortName = "eth1",
            Native = true,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                test1PortVlanAttachment,
            },
        });
    
    });
    
    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 {
    		test, err := metal.NewDevice(ctx, "test", &metal.DeviceArgs{
    			Hostname:        pulumi.String("test"),
    			Plan:            pulumi.String(metal.PlanC3SmallX86),
    			Metro:           pulumi.String("ny"),
    			OperatingSystem: pulumi.String(metal.OperatingSystem_Ubuntu20_04),
    			BillingCycle:    pulumi.String(metal.BillingCycleHourly),
    			ProjectId:       pulumi.Any(projectId),
    		})
    		if err != nil {
    			return err
    		}
    		testDeviceNetworkType, err := metal.NewDeviceNetworkType(ctx, "testDeviceNetworkType", &metal.DeviceNetworkTypeArgs{
    			DeviceId: test.ID(),
    			Type:     pulumi.String("layer2-individual"),
    		})
    		if err != nil {
    			return err
    		}
    		test1, err := metal.NewVlan(ctx, "test1", &metal.VlanArgs{
    			Description: pulumi.String("VLAN in New York"),
    			Metro:       pulumi.String("ny"),
    			ProjectId:   pulumi.Any(projectId),
    		})
    		if err != nil {
    			return err
    		}
    		test2, err := metal.NewVlan(ctx, "test2", &metal.VlanArgs{
    			Description: pulumi.String("VLAN in New Jersey"),
    			Metro:       pulumi.String("ny"),
    			ProjectId:   pulumi.Any(projectId),
    		})
    		if err != nil {
    			return err
    		}
    		test1PortVlanAttachment, err := metal.NewPortVlanAttachment(ctx, "test1PortVlanAttachment", &metal.PortVlanAttachmentArgs{
    			DeviceId: testDeviceNetworkType.ID(),
    			VlanVnid: test1.Vxlan,
    			PortName: pulumi.String("eth1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = metal.NewPortVlanAttachment(ctx, "test2PortVlanAttachment", &metal.PortVlanAttachmentArgs{
    			DeviceId: testDeviceNetworkType.ID(),
    			VlanVnid: test2.Vxlan,
    			PortName: pulumi.String("eth1"),
    			Native:   pulumi.Bool(true),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			test1PortVlanAttachment,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.equinix.metal.Device;
    import com.pulumi.equinix.metal.DeviceArgs;
    import com.pulumi.equinix.metal.DeviceNetworkType;
    import com.pulumi.equinix.metal.DeviceNetworkTypeArgs;
    import com.pulumi.equinix.metal.Vlan;
    import com.pulumi.equinix.metal.VlanArgs;
    import com.pulumi.equinix.metal.PortVlanAttachment;
    import com.pulumi.equinix.metal.PortVlanAttachmentArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 test = new Device("test", DeviceArgs.builder()
                .hostname("test")
                .plan("c3.small.x86")
                .metro("ny")
                .operatingSystem("ubuntu_20_04")
                .billingCycle("hourly")
                .projectId(projectId)
                .build());
    
            var testDeviceNetworkType = new DeviceNetworkType("testDeviceNetworkType", DeviceNetworkTypeArgs.builder()
                .deviceId(test.id())
                .type("layer2-individual")
                .build());
    
            var test1 = new Vlan("test1", VlanArgs.builder()
                .description("VLAN in New York")
                .metro("ny")
                .projectId(projectId)
                .build());
    
            var test2 = new Vlan("test2", VlanArgs.builder()
                .description("VLAN in New Jersey")
                .metro("ny")
                .projectId(projectId)
                .build());
    
            var test1PortVlanAttachment = new PortVlanAttachment("test1PortVlanAttachment", PortVlanAttachmentArgs.builder()
                .deviceId(testDeviceNetworkType.id())
                .vlanVnid(test1.vxlan())
                .portName("eth1")
                .build());
    
            var test2PortVlanAttachment = new PortVlanAttachment("test2PortVlanAttachment", PortVlanAttachmentArgs.builder()
                .deviceId(testDeviceNetworkType.id())
                .vlanVnid(test2.vxlan())
                .portName("eth1")
                .native_(true)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(test1PortVlanAttachment)
                    .build());
    
        }
    }
    
    import pulumi
    import pulumi_equinix as equinix
    
    test = equinix.metal.Device("test",
        hostname="test",
        plan=equinix.metal.Plan.C3_SMALL_X86,
        metro="ny",
        operating_system=equinix.metal.OperatingSystem.UBUNTU20_04,
        billing_cycle=equinix.metal.BillingCycle.HOURLY,
        project_id=project_id)
    test_device_network_type = equinix.metal.DeviceNetworkType("testDeviceNetworkType",
        device_id=test.id,
        type="layer2-individual")
    test1 = equinix.metal.Vlan("test1",
        description="VLAN in New York",
        metro="ny",
        project_id=project_id)
    test2 = equinix.metal.Vlan("test2",
        description="VLAN in New Jersey",
        metro="ny",
        project_id=project_id)
    test1_port_vlan_attachment = equinix.metal.PortVlanAttachment("test1PortVlanAttachment",
        device_id=test_device_network_type.id,
        vlan_vnid=test1.vxlan,
        port_name="eth1")
    test2_port_vlan_attachment = equinix.metal.PortVlanAttachment("test2PortVlanAttachment",
        device_id=test_device_network_type.id,
        vlan_vnid=test2.vxlan,
        port_name="eth1",
        native=True,
        opts = pulumi.ResourceOptions(depends_on=[test1_port_vlan_attachment]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as equinix from "@equinix-labs/pulumi-equinix";
    
    const test = new equinix.metal.Device("test", {
        hostname: "test",
        plan: equinix.metal.Plan.C3SmallX86,
        metro: "ny",
        operatingSystem: equinix.metal.OperatingSystem.Ubuntu20_04,
        billingCycle: equinix.metal.BillingCycle.Hourly,
        projectId: projectId,
    });
    const testDeviceNetworkType = new equinix.metal.DeviceNetworkType("testDeviceNetworkType", {
        deviceId: test.id,
        type: "layer2-individual",
    });
    const test1 = new equinix.metal.Vlan("test1", {
        description: "VLAN in New York",
        metro: "ny",
        projectId: projectId,
    });
    const test2 = new equinix.metal.Vlan("test2", {
        description: "VLAN in New Jersey",
        metro: "ny",
        projectId: projectId,
    });
    const test1PortVlanAttachment = new equinix.metal.PortVlanAttachment("test1PortVlanAttachment", {
        deviceId: testDeviceNetworkType.id,
        vlanVnid: test1.vxlan,
        portName: "eth1",
    });
    const test2PortVlanAttachment = new equinix.metal.PortVlanAttachment("test2PortVlanAttachment", {
        deviceId: testDeviceNetworkType.id,
        vlanVnid: test2.vxlan,
        portName: "eth1",
        native: true,
    }, {
        dependsOn: [test1PortVlanAttachment],
    });
    
      test:
        type: equinix:metal:Device
        properties:
          hostname: test
          plan: c3.small.x86
          metro: ny
          operatingSystem: ubuntu_20_04
          billingCycle: hourly
          projectId: ${projectId}
      testDeviceNetworkType:
        type: equinix:metal:DeviceNetworkType
        name: test
        properties:
          deviceId: ${test.id}
          type: layer2-individual
      test1:
        type: equinix:metal:Vlan
        properties:
          description: VLAN in New York
          metro: ny
          projectId: ${projectId}
      test2:
        type: equinix:metal:Vlan
        properties:
          description: VLAN in New Jersey
          metro: ny
          projectId: ${projectId}
      test1PortVlanAttachment:
        type: equinix:metal:PortVlanAttachment
        name: test1
        properties:
          deviceId: ${testDeviceNetworkType.id}
          vlanVnid: ${test1.vxlan}
          portName: eth1
      test2PortVlanAttachment:
        type: equinix:metal:PortVlanAttachment
        name: test2
        properties:
          deviceId: ${testDeviceNetworkType.id}
          vlanVnid: ${test2.vxlan}
          portName: eth1
          native: true
        options:
          dependson:
            - ${test1PortVlanAttachment}
    

    Create PortVlanAttachment Resource

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

    Constructor syntax

    new PortVlanAttachment(name: string, args: PortVlanAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def PortVlanAttachment(resource_name: str,
                           args: PortVlanAttachmentArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def PortVlanAttachment(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           device_id: Optional[str] = None,
                           port_name: Optional[str] = None,
                           vlan_vnid: Optional[int] = None,
                           force_bond: Optional[bool] = None,
                           native: Optional[bool] = None)
    func NewPortVlanAttachment(ctx *Context, name string, args PortVlanAttachmentArgs, opts ...ResourceOption) (*PortVlanAttachment, error)
    public PortVlanAttachment(string name, PortVlanAttachmentArgs args, CustomResourceOptions? opts = null)
    public PortVlanAttachment(String name, PortVlanAttachmentArgs args)
    public PortVlanAttachment(String name, PortVlanAttachmentArgs args, CustomResourceOptions options)
    
    type: equinix:metal:PortVlanAttachment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PortVlanAttachmentArgs
    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 PortVlanAttachmentArgs
    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 PortVlanAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PortVlanAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PortVlanAttachmentArgs
    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 portVlanAttachmentResource = new Equinix.Metal.PortVlanAttachment("portVlanAttachmentResource", new()
    {
        DeviceId = "string",
        PortName = "string",
        VlanVnid = 0,
        ForceBond = false,
        Native = false,
    });
    
    example, err := metal.NewPortVlanAttachment(ctx, "portVlanAttachmentResource", &metal.PortVlanAttachmentArgs{
    	DeviceId:  pulumi.String("string"),
    	PortName:  pulumi.String("string"),
    	VlanVnid:  pulumi.Int(0),
    	ForceBond: pulumi.Bool(false),
    	Native:    pulumi.Bool(false),
    })
    
    var portVlanAttachmentResource = new PortVlanAttachment("portVlanAttachmentResource", PortVlanAttachmentArgs.builder()
        .deviceId("string")
        .portName("string")
        .vlanVnid(0)
        .forceBond(false)
        .native_(false)
        .build());
    
    port_vlan_attachment_resource = equinix.metal.PortVlanAttachment("portVlanAttachmentResource",
        device_id="string",
        port_name="string",
        vlan_vnid=0,
        force_bond=False,
        native=False)
    
    const portVlanAttachmentResource = new equinix.metal.PortVlanAttachment("portVlanAttachmentResource", {
        deviceId: "string",
        portName: "string",
        vlanVnid: 0,
        forceBond: false,
        native: false,
    });
    
    type: equinix:metal:PortVlanAttachment
    properties:
        deviceId: string
        forceBond: false
        native: false
        portName: string
        vlanVnid: 0
    

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

    DeviceId string
    ID of device to be assigned to the VLAN.
    PortName string
    Name of network port to be assigned to the VLAN.
    VlanVnid int
    VXLAN Network Identifier.
    ForceBond bool
    Add port back to the bond when this resource is removed. Default is false.
    Native bool
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.
    DeviceId string
    ID of device to be assigned to the VLAN.
    PortName string
    Name of network port to be assigned to the VLAN.
    VlanVnid int
    VXLAN Network Identifier.
    ForceBond bool
    Add port back to the bond when this resource is removed. Default is false.
    Native bool
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.
    deviceId String
    ID of device to be assigned to the VLAN.
    portName String
    Name of network port to be assigned to the VLAN.
    vlanVnid Integer
    VXLAN Network Identifier.
    forceBond Boolean
    Add port back to the bond when this resource is removed. Default is false.
    native_ Boolean
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.
    deviceId string
    ID of device to be assigned to the VLAN.
    portName string
    Name of network port to be assigned to the VLAN.
    vlanVnid number
    VXLAN Network Identifier.
    forceBond boolean
    Add port back to the bond when this resource is removed. Default is false.
    native boolean
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.
    device_id str
    ID of device to be assigned to the VLAN.
    port_name str
    Name of network port to be assigned to the VLAN.
    vlan_vnid int
    VXLAN Network Identifier.
    force_bond bool
    Add port back to the bond when this resource is removed. Default is false.
    native bool
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.
    deviceId String
    ID of device to be assigned to the VLAN.
    portName String
    Name of network port to be assigned to the VLAN.
    vlanVnid Number
    VXLAN Network Identifier.
    forceBond Boolean
    Add port back to the bond when this resource is removed. Default is false.
    native Boolean
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    PortId string
    UUID of device port
    VlanId string
    UUID of VLAN API resource
    Id string
    The provider-assigned unique ID for this managed resource.
    PortId string
    UUID of device port
    VlanId string
    UUID of VLAN API resource
    id String
    The provider-assigned unique ID for this managed resource.
    portId String
    UUID of device port
    vlanId String
    UUID of VLAN API resource
    id string
    The provider-assigned unique ID for this managed resource.
    portId string
    UUID of device port
    vlanId string
    UUID of VLAN API resource
    id str
    The provider-assigned unique ID for this managed resource.
    port_id str
    UUID of device port
    vlan_id str
    UUID of VLAN API resource
    id String
    The provider-assigned unique ID for this managed resource.
    portId String
    UUID of device port
    vlanId String
    UUID of VLAN API resource

    Look up Existing PortVlanAttachment Resource

    Get an existing PortVlanAttachment 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?: PortVlanAttachmentState, opts?: CustomResourceOptions): PortVlanAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            device_id: Optional[str] = None,
            force_bond: Optional[bool] = None,
            native: Optional[bool] = None,
            port_id: Optional[str] = None,
            port_name: Optional[str] = None,
            vlan_id: Optional[str] = None,
            vlan_vnid: Optional[int] = None) -> PortVlanAttachment
    func GetPortVlanAttachment(ctx *Context, name string, id IDInput, state *PortVlanAttachmentState, opts ...ResourceOption) (*PortVlanAttachment, error)
    public static PortVlanAttachment Get(string name, Input<string> id, PortVlanAttachmentState? state, CustomResourceOptions? opts = null)
    public static PortVlanAttachment get(String name, Output<String> id, PortVlanAttachmentState 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:
    DeviceId string
    ID of device to be assigned to the VLAN.
    ForceBond bool
    Add port back to the bond when this resource is removed. Default is false.
    Native bool
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.
    PortId string
    UUID of device port
    PortName string
    Name of network port to be assigned to the VLAN.
    VlanId string
    UUID of VLAN API resource
    VlanVnid int
    VXLAN Network Identifier.
    DeviceId string
    ID of device to be assigned to the VLAN.
    ForceBond bool
    Add port back to the bond when this resource is removed. Default is false.
    Native bool
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.
    PortId string
    UUID of device port
    PortName string
    Name of network port to be assigned to the VLAN.
    VlanId string
    UUID of VLAN API resource
    VlanVnid int
    VXLAN Network Identifier.
    deviceId String
    ID of device to be assigned to the VLAN.
    forceBond Boolean
    Add port back to the bond when this resource is removed. Default is false.
    native_ Boolean
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.
    portId String
    UUID of device port
    portName String
    Name of network port to be assigned to the VLAN.
    vlanId String
    UUID of VLAN API resource
    vlanVnid Integer
    VXLAN Network Identifier.
    deviceId string
    ID of device to be assigned to the VLAN.
    forceBond boolean
    Add port back to the bond when this resource is removed. Default is false.
    native boolean
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.
    portId string
    UUID of device port
    portName string
    Name of network port to be assigned to the VLAN.
    vlanId string
    UUID of VLAN API resource
    vlanVnid number
    VXLAN Network Identifier.
    device_id str
    ID of device to be assigned to the VLAN.
    force_bond bool
    Add port back to the bond when this resource is removed. Default is false.
    native bool
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.
    port_id str
    UUID of device port
    port_name str
    Name of network port to be assigned to the VLAN.
    vlan_id str
    UUID of VLAN API resource
    vlan_vnid int
    VXLAN Network Identifier.
    deviceId String
    ID of device to be assigned to the VLAN.
    forceBond Boolean
    Add port back to the bond when this resource is removed. Default is false.
    native Boolean
    Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use depends_on pointing to another equinix.metal.PortVlanAttachment, just like in the layer2-individual example above.
    portId String
    UUID of device port
    portName String
    Name of network port to be assigned to the VLAN.
    vlanId String
    UUID of VLAN API resource
    vlanVnid Number
    VXLAN Network Identifier.

    Package Details

    Repository
    equinix equinix/pulumi-equinix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the equinix Terraform Provider.
    equinix logo
    Equinix v0.13.0 published on Monday, Jul 22, 2024 by Equinix