getVlans

Provides details about Linode VLANs.

Attributes

Each Linode VLAN will be stored in the vlans attribute and will export the following attributes:

  • label - The unique label of the VLAN.

  • linodes - The running Linodes currently attached to the VLAN.

  • region - The region the VLAN is located in. See all regions here.

  • created - When the VLAN was created.

Filterable Fields

  • label

  • region

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
    public MyStack()
    {
        var myInstance = new Linode.Instance("myInstance", new Linode.InstanceArgs
        {
            Image = "linode/ubuntu18.04",
            Interfaces = 
            {
                new Linode.Inputs.InstanceInterfaceArgs
                {
                    Label = "my-vlan",
                    Purpose = "vlan",
                },
            },
            Label = "my_instance",
            Region = "us-southeast",
            RootPass = "bogusPassword$",
            Type = "g6-standard-1",
        });
        var my_vlans = Output.Create(Linode.GetVlans.InvokeAsync(new Linode.GetVlansArgs
        {
            Filters = 
            {
                new Linode.Inputs.GetVlansFilterArgs
                {
                    Name = "label",
                    Values = 
                    {
                        "my-vlan",
                    },
                },
            },
        }));
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-linode/sdk/v3/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := linode.NewInstance(ctx, "myInstance", &linode.InstanceArgs{
			Image: pulumi.String("linode/ubuntu18.04"),
			Interfaces: InstanceInterfaceArray{
				&InstanceInterfaceArgs{
					Label:   pulumi.String("my-vlan"),
					Purpose: pulumi.String("vlan"),
				},
			},
			Label:    pulumi.String("my_instance"),
			Region:   pulumi.String("us-southeast"),
			RootPass: pulumi.String(fmt.Sprintf("%v%v", "bogusPassword", "$")),
			Type:     pulumi.String("g6-standard-1"),
		})
		if err != nil {
			return err
		}
		_, err = linode.GetVlans(ctx, &GetVlansArgs{
			Filters: []GetVlansFilter{
				GetVlansFilter{
					Name: "label",
					Values: []string{
						"my-vlan",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_linode as linode

my_instance = linode.Instance("myInstance",
    image="linode/ubuntu18.04",
    interfaces=[linode.InstanceInterfaceArgs(
        label="my-vlan",
        purpose="vlan",
    )],
    label="my_instance",
    region="us-southeast",
    root_pass="bogusPassword$",
    type="g6-standard-1")
my_vlans = linode.get_vlans(filters=[linode.GetVlansFilterArgs(
    name="label",
    values=["my-vlan"],
)])
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const myInstance = new linode.Instance("my_instance", {
    image: "linode/ubuntu18.04",
    interfaces: [{
        label: "my-vlan",
        purpose: "vlan",
    }],
    label: "my_instance",
    region: "us-southeast",
    rootPass: "bogusPassword$",
    type: "g6-standard-1",
});
const my_vlans = pulumi.output(linode.getVlans({
    filters: [{
        name: "label",
        values: ["my-vlan"],
    }],
}));

Using getVlans

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getVlans(args: GetVlansArgs, opts?: InvokeOptions): Promise<GetVlansResult>
function getVlansOutput(args: GetVlansOutputArgs, opts?: InvokeOptions): Output<GetVlansResult>
def get_vlans(filters: Optional[Sequence[GetVlansFilter]] = None,
              order: Optional[str] = None,
              order_by: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetVlansResult
def get_vlans_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetVlansFilterArgs]]]] = None,
              order: Optional[pulumi.Input[str]] = None,
              order_by: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetVlansResult]
func GetVlans(ctx *Context, args *GetVlansArgs, opts ...InvokeOption) (*GetVlansResult, error)
func GetVlansOutput(ctx *Context, args *GetVlansOutputArgs, opts ...InvokeOption) GetVlansResultOutput

> Note: This function is named GetVlans in the Go SDK.

public static class GetVlans 
{
    public static Task<GetVlansResult> InvokeAsync(GetVlansArgs args, InvokeOptions? opts = null)
    public static Output<GetVlansResult> Invoke(GetVlansInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetVlansFilter>
Order string
The order in which results should be returned. (asc, desc; default asc)
OrderBy string
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
Filters []GetVlansFilter
Order string
The order in which results should be returned. (asc, desc; default asc)
OrderBy string
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
filters GetVlansFilter[]
order string
The order in which results should be returned. (asc, desc; default asc)
orderBy string
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
filters Sequence[GetVlansFilter]
order str
The order in which results should be returned. (asc, desc; default asc)
order_by str
The attribute to order the results by. See the Filterable Fields section for a list of valid fields.

getVlans Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Vlans List<GetVlansVlan>
Filters List<GetVlansFilter>
Order string
OrderBy string
Id string
The provider-assigned unique ID for this managed resource.
Vlans []GetVlansVlan
Filters []GetVlansFilter
Order string
OrderBy string
id string
The provider-assigned unique ID for this managed resource.
vlans GetVlansVlan[]
filters GetVlansFilter[]
order string
orderBy string
id str
The provider-assigned unique ID for this managed resource.
vlans Sequence[GetVlansVlan]
filters Sequence[GetVlansFilter]
order str
order_by str

Supporting Types

GetVlansFilter

Name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
Values List<string>
A list of values for the filter to allow. These values should all be in string form.
MatchBy string
The method to match the field by. (exact, regex, substring; default exact)
Name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
Values []string
A list of values for the filter to allow. These values should all be in string form.
MatchBy string
The method to match the field by. (exact, regex, substring; default exact)
name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values string[]
A list of values for the filter to allow. These values should all be in string form.
matchBy string
The method to match the field by. (exact, regex, substring; default exact)
name str
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values Sequence[str]
A list of values for the filter to allow. These values should all be in string form.
match_by str
The method to match the field by. (exact, regex, substring; default exact)

GetVlansVlan

Created string
Label string
Linodes List<int>
Region string
Created string
Label string
Linodes []int
Region string
created string
label string
linodes number[]
region string
created str
label str
linodes Sequence[int]
region str

Package Details

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