1. Packages
  2. Packet
  3. API Docs
  4. Vlan
Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi

packet.Vlan

Explore with Pulumi AI

packet logo
Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi

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

    To learn more about Layer 2 networking in Packet, refer to

    • https://www.packet.com/resources/guides/layer-2-configurations/
    • https://www.packet.com/developers/docs/network/advanced/layer-2/

    Example Usage

    using Pulumi;
    using Packet = Pulumi.Packet;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            // Create a new VLAN in datacenter "ewr1"
            var vlan1 = new Packet.Vlan("vlan1", new Packet.VlanArgs
            {
                Description = "VLAN in New Jersey",
                Facility = "ewr1",
                ProjectId = local.Project_id,
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-packet/sdk/v3/go/packet"
    	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := packet.NewVlan(ctx, "vlan1", &packet.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
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_packet as packet
    
    # Create a new VLAN in datacenter "ewr1"
    vlan1 = packet.Vlan("vlan1",
        description="VLAN in New Jersey",
        facility="ewr1",
        project_id=local["project_id"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as packet from "@pulumi/packet";
    
    // Create a new VLAN in datacenter "ewr1"
    const vlan1 = new packet.Vlan("vlan1", {
        description: "VLAN in New Jersey",
        facility: "ewr1",
        projectId: local.project_id,
    });
    

    Coming soon!

    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,
             facility: Optional[str] = None,
             project_id: Optional[str] = None,
             description: Optional[str] = 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: packet:Vlan
    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 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.
    args 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 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.
    name String
    The unique name of the resource.
    args 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 Packet.Vlan("vlanResource", new()
    {
        Facility = "string",
        ProjectId = "string",
        Description = "string",
    });
    
    example, err := packet.NewVlan(ctx, "vlanResource", &packet.VlanArgs{
    	Facility:    pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    	Description: pulumi.String("string"),
    })
    
    var vlanResource = new Vlan("vlanResource", VlanArgs.builder()
        .facility("string")
        .projectId("string")
        .description("string")
        .build());
    
    vlan_resource = packet.Vlan("vlanResource",
        facility="string",
        project_id="string",
        description="string")
    
    const vlanResource = new packet.Vlan("vlanResource", {
        facility: "string",
        projectId: "string",
        description: "string",
    });
    
    type: packet:Vlan
    properties:
        description: string
        facility: string
        projectId: string
    

    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:

    Facility string
    Facility where to create the VLAN
    ProjectId string
    ID of parent project
    Description string
    Description string
    Facility string
    Facility where to create the VLAN
    ProjectId string
    ID of parent project
    Description string
    Description string
    facility String
    Facility where to create the VLAN
    projectId String
    ID of parent project
    description String
    Description string
    facility Facility
    Facility where to create the VLAN
    projectId string
    ID of parent project
    description string
    Description string
    facility str
    Facility where to create the VLAN
    project_id str
    ID of parent project
    description str
    Description string
    facility
    Facility where to create the VLAN
    projectId String
    ID of parent project
    description String
    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 Integer
    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
    id String
    The provider-assigned unique ID for this managed resource.
    vxlan Number
    VXLAN segment ID

    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[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)
    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:
    Description string
    Description string
    Facility string
    Facility where to create the VLAN
    ProjectId string
    ID of parent project
    Vxlan int
    VXLAN segment ID
    Description string
    Description string
    Facility string
    Facility where to create the VLAN
    ProjectId string
    ID of parent project
    Vxlan int
    VXLAN segment ID
    description String
    Description string
    facility String
    Facility where to create the VLAN
    projectId String
    ID of parent project
    vxlan Integer
    VXLAN segment ID
    description string
    Description string
    facility 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 where to create the VLAN
    project_id str
    ID of parent project
    vxlan int
    VXLAN segment ID
    description String
    Description string
    facility
    Facility where to create the VLAN
    projectId String
    ID of parent project
    vxlan Number
    VXLAN segment ID

    Package Details

    Repository
    Packet pulumi/pulumi-packet
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the packet Terraform Provider.
    packet logo
    Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi