packet.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 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
new Vlan(name: string, args: VlanArgs, opts?: CustomResourceOptions);
@overload
def Vlan(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
facility: Optional[str] = None,
project_id: Optional[str] = None)
@overload
def Vlan(resource_name: str,
args: VlanArgs,
opts: Optional[ResourceOptions] = None)
func NewVlan(ctx *Context, name string, args VlanArgs, opts ...ResourceOption) (*Vlan, error)
public Vlan(string name, VlanArgs args, CustomResourceOptions? opts = null)
type: packet:Vlan
properties: # The arguments to resource properties.
options: # 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.
- 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.
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
The Vlan resource accepts the following input properties:
- Facility string
Facility where to create the VLAN
- Project
Id string ID of parent project
- Description string
Description string
- Facility string
Facility where to create the VLAN
- Project
Id string ID of parent project
- Description string
Description string
- facility String
Facility where to create the VLAN
- project
Id String ID of parent project
- description String
Description string
- facility Facility
Facility where to create the VLAN
- project
Id 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
- project
Id 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:
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.
- Description string
Description string
- Facility string
Facility where to create the VLAN
- Project
Id string ID of parent project
- Vxlan int
VXLAN segment ID
- Description string
Description string
- Facility string
Facility where to create the VLAN
- Project
Id string ID of parent project
- Vxlan int
VXLAN segment ID
- description String
Description string
- facility String
Facility where to create the VLAN
- project
Id String ID of parent project
- vxlan Integer
VXLAN segment ID
- description string
Description string
- facility Facility
Facility where to create the VLAN
- project
Id 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
- project
Id 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.