1. Registry
  2. Packages
  3. Linode Provider
  4. API Docs
  5. getVpcs
Viewing docs for Linode v6.8.0
published on Wednesday, Oct 21, 2026 by Pulumi
linode logo linode logo
Viewing docs for Linode v6.8.0
published on Wednesday, Oct 21, 2026 by Pulumi

    Provides information about a list of Linode VPCs that match a set of filters. For more information, see the Linode APIv4 docs.

    Example Usage

    The following example shows how one might use this data source to list VPCs.

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const filtered_vpcs = linode.getVpcs({
        filters: [{
            name: "label",
            values: ["test"],
        }],
    });
    export const vpcs = filtered_vpcs.then(filtered_vpcs => filtered_vpcs.vpcs);
    
    import pulumi
    import pulumi_linode as linode
    
    filtered_vpcs = linode.get_vpcs(filters=[{
        "name": "label",
        "values": ["test"],
    }])
    pulumi.export("vpcs", filtered_vpcs.vpcs)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v6/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		filtered_vpcs, err := linode.GetVpcs(ctx, &linode.GetVpcsArgs{
    			Filters: []linode.GetVpcsFilter{
    				{
    					Name: "label",
    					Values: []string{
    						"test",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("vpcs", filtered_vpcs.Vpcs)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var filtered_vpcs = Linode.GetVpcs.Invoke(new()
        {
            Filters = new[]
            {
                new Linode.Inputs.GetVpcsFilterInputArgs
                {
                    Name = "label",
                    Values = new[]
                    {
                        "test",
                    },
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["vpcs"] = filtered_vpcs.Apply(filtered_vpcs => filtered_vpcs.Apply(getVpcsResult => getVpcsResult.Vpcs)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.LinodeFunctions;
    import com.pulumi.linode.inputs.GetVpcsArgs;
    import com.pulumi.linode.inputs.GetVpcsFilterArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            final var filtered-vpcs = LinodeFunctions.getVpcs(GetVpcsArgs.builder()
                .filters(GetVpcsFilterArgs.builder()
                    .name("label")
                    .values("test")
                    .build())
                .build());
    
            ctx.export("vpcs", filtered_vpcs.vpcs());
        }
    }
    
    variables:
      filtered-vpcs:
        fn::invoke:
          function: linode:getVpcs
          arguments:
            filters:
              - name: label
                values:
                  - test
    outputs:
      vpcs: ${["filtered-vpcs"].vpcs}
    
    terraform {
      required_providers {
        linode = {
          source = "pulumi/linode"
        }
      }
    }
    
    data "linode_vpcs" "filtered-vpcs" {
      filters {
        name   = "label"
        values = ["test"]
      }
    }
    
    output "vpcs" {
      value = data.linode_vpcs.filtered-vpcs.vpcs
    }
    

    IPv6

    Limited Availability IPv6 VPCs may not currently be available to all users.

    Contains information about a single IPv6 allocation under a VPC.

    • range - The allocated range in CIDR format.

    IPv4

    Limited Availability Custom VPC IPv4 Ranges may not currently be available to all users.

    Contains information about a single IPv4 range under this VPC.

    • range - The IPv4 range in CIDR format.

    Filterable Fields

    • id

    • label

    • description

    • region

    Using getVpcs

    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 getVpcs(args: GetVpcsArgs, opts?: InvokeOptions): Promise<GetVpcsResult>
    function getVpcsOutput(args: GetVpcsOutputArgs, opts?: InvokeOutputOptions): Output<GetVpcsResult>
    def get_vpcs(filters: Optional[Sequence[GetVpcsFilter]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetVpcsResult
    def get_vpcs_output(filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetVpcsFilterArgs]]]] = None,
                 opts: Optional[InvokeOutputOptions] = None) -> Output[GetVpcsResult]
    func GetVpcs(ctx *Context, args *GetVpcsArgs, opts ...InvokeOption) (*GetVpcsResult, error)
    func GetVpcsOutput(ctx *Context, args *GetVpcsOutputArgs, opts ...InvokeOption) GetVpcsResultOutput

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

    public static class GetVpcs 
    {
        public static Task<GetVpcsResult> InvokeAsync(GetVpcsArgs args, InvokeOptions? opts = null)
        public static Output<GetVpcsResult> Invoke(GetVpcsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetVpcsResult> Invoke(GetVpcsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetVpcsResult> getVpcs(GetVpcsArgs args, InvokeOptions options)
    public static Output<GetVpcsResult> getVpcs(GetVpcsArgs args, InvokeOptions options)
    public static Output<GetVpcsResult> getVpcs(GetVpcsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: linode:index/getVpcs:getVpcs
      arguments:
        # arguments dictionary
    data "linode_get_vpcs" "name" {
        # arguments
    }

    The following arguments are supported:

    getVpcs Result

    The following output properties are available:

    Id string
    The unique id of this VPC.
    Vpcs List<GetVpcsVpc>
    (Nested Attribute List) The VPCs returned by this data source.
    Filters List<GetVpcsFilter>
    Id string
    The unique id of this VPC.
    Vpcs []GetVpcsVpc
    (Nested Attribute List) The VPCs returned by this data source.
    Filters []GetVpcsFilter
    id string
    The unique id of this VPC.
    vpcs list(object)
    (Nested Attribute List) The VPCs returned by this data source.
    filters list(object)
    id String
    The unique id of this VPC.
    vpcs List<GetVpcsVpc>
    (Nested Attribute List) The VPCs returned by this data source.
    filters List<GetVpcsFilter>
    id string
    The unique id of this VPC.
    vpcs GetVpcsVpc[]
    (Nested Attribute List) The VPCs returned by this data source.
    filters GetVpcsFilter[]
    id str
    The unique id of this VPC.
    vpcs Sequence[GetVpcsVpc]
    (Nested Attribute List) The VPCs returned by this data source.
    filters Sequence[GetVpcsFilter]
    id String
    The unique id of this VPC.
    vpcs List<Property Map>
    (Nested Attribute List) The VPCs returned by this data source.
    filters List<Property Map>

    Supporting Types

    GetVpcsFilter

    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 list(string)
    A list of values for the filter to allow. These values should all be in string form.
    match_by 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 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 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)
    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)

    GetVpcsVpc

    Created string
    The date and time when the VPC was created.
    Description string
    The user-defined description of this VPC.
    Id string
    The unique id of this VPC.
    Ipv4s List<GetVpcsVpcIpv4>
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    Ipv6s List<GetVpcsVpcIpv6>
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    Label string
    The label of the VPC.
    Region string
    The region where the VPC is deployed.
    Subnets List<GetVpcsVpcSubnet>
    A list of subnets under this VPC.
    Updated string
    The date and time when the VPC was last updated.
    VpcType string
    The type of the VPC ('regular' or 'rdma'). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
    Created string
    The date and time when the VPC was created.
    Description string
    The user-defined description of this VPC.
    Id string
    The unique id of this VPC.
    Ipv4s []GetVpcsVpcIpv4
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    Ipv6s []GetVpcsVpcIpv6
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    Label string
    The label of the VPC.
    Region string
    The region where the VPC is deployed.
    Subnets []GetVpcsVpcSubnet
    A list of subnets under this VPC.
    Updated string
    The date and time when the VPC was last updated.
    VpcType string
    The type of the VPC ('regular' or 'rdma'). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
    created string
    The date and time when the VPC was created.
    description string
    The user-defined description of this VPC.
    id string
    The unique id of this VPC.
    ipv4s list(object)
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    ipv6s list(object)
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    label string
    The label of the VPC.
    region string
    The region where the VPC is deployed.
    subnets list(object)
    A list of subnets under this VPC.
    updated string
    The date and time when the VPC was last updated.
    vpc_type string
    The type of the VPC ('regular' or 'rdma'). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
    created String
    The date and time when the VPC was created.
    description String
    The user-defined description of this VPC.
    id String
    The unique id of this VPC.
    ipv4s List<GetVpcsVpcIpv4>
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    ipv6s List<GetVpcsVpcIpv6>
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    label String
    The label of the VPC.
    region String
    The region where the VPC is deployed.
    subnets List<GetVpcsVpcSubnet>
    A list of subnets under this VPC.
    updated String
    The date and time when the VPC was last updated.
    vpcType String
    The type of the VPC ('regular' or 'rdma'). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
    created string
    The date and time when the VPC was created.
    description string
    The user-defined description of this VPC.
    id string
    The unique id of this VPC.
    ipv4s GetVpcsVpcIpv4[]
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    ipv6s GetVpcsVpcIpv6[]
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    label string
    The label of the VPC.
    region string
    The region where the VPC is deployed.
    subnets GetVpcsVpcSubnet[]
    A list of subnets under this VPC.
    updated string
    The date and time when the VPC was last updated.
    vpcType string
    The type of the VPC ('regular' or 'rdma'). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
    created str
    The date and time when the VPC was created.
    description str
    The user-defined description of this VPC.
    id str
    The unique id of this VPC.
    ipv4s Sequence[GetVpcsVpcIpv4]
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    ipv6s Sequence[GetVpcsVpcIpv6]
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    label str
    The label of the VPC.
    region str
    The region where the VPC is deployed.
    subnets Sequence[GetVpcsVpcSubnet]
    A list of subnets under this VPC.
    updated str
    The date and time when the VPC was last updated.
    vpc_type str
    The type of the VPC ('regular' or 'rdma'). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
    created String
    The date and time when the VPC was created.
    description String
    The user-defined description of this VPC.
    id String
    The unique id of this VPC.
    ipv4s List<Property Map>
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    ipv6s List<Property Map>
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    label String
    The label of the VPC.
    region String
    The region where the VPC is deployed.
    subnets List<Property Map>
    A list of subnets under this VPC.
    updated String
    The date and time when the VPC was last updated.
    vpcType String
    The type of the VPC ('regular' or 'rdma'). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.

    GetVpcsVpcIpv4

    Range string
    The IPv4 range assigned to this VPC.
    Range string
    The IPv4 range assigned to this VPC.
    range string
    The IPv4 range assigned to this VPC.
    range String
    The IPv4 range assigned to this VPC.
    range string
    The IPv4 range assigned to this VPC.
    range str
    The IPv4 range assigned to this VPC.
    range String
    The IPv4 range assigned to this VPC.

    GetVpcsVpcIpv6

    Range string
    The IPv6 range assigned to this VPC.
    Range string
    The IPv6 range assigned to this VPC.
    range string
    The IPv6 range assigned to this VPC.
    range String
    The IPv6 range assigned to this VPC.
    range string
    The IPv6 range assigned to this VPC.
    range str
    The IPv6 range assigned to this VPC.
    range String
    The IPv6 range assigned to this VPC.

    GetVpcsVpcSubnet

    Created string
    The date and time when the VPC was created.
    Databases List<GetVpcsVpcSubnetDatabase>
    A list of Managed Databases assigned to this subnet.
    Id int
    The unique id of this VPC.
    Ipv4 string
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    Ipv6s List<GetVpcsVpcSubnetIpv6>
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    Label string
    The label of the VPC.
    Linodes List<GetVpcsVpcSubnetLinode>
    A list of Linodes assigned to this subnet.
    Nodebalancers List<GetVpcsVpcSubnetNodebalancer>
    A list of NodeBalancers assigned to this subnet.
    Updated string
    The date and time when the VPC was last updated.
    Created string
    The date and time when the VPC was created.
    Databases []GetVpcsVpcSubnetDatabase
    A list of Managed Databases assigned to this subnet.
    Id int
    The unique id of this VPC.
    Ipv4 string
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    Ipv6s []GetVpcsVpcSubnetIpv6
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    Label string
    The label of the VPC.
    Linodes []GetVpcsVpcSubnetLinode
    A list of Linodes assigned to this subnet.
    Nodebalancers []GetVpcsVpcSubnetNodebalancer
    A list of NodeBalancers assigned to this subnet.
    Updated string
    The date and time when the VPC was last updated.
    created string
    The date and time when the VPC was created.
    databases list(object)
    A list of Managed Databases assigned to this subnet.
    id number
    The unique id of this VPC.
    ipv4 string
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    ipv6s list(object)
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    label string
    The label of the VPC.
    linodes list(object)
    A list of Linodes assigned to this subnet.
    nodebalancers list(object)
    A list of NodeBalancers assigned to this subnet.
    updated string
    The date and time when the VPC was last updated.
    created String
    The date and time when the VPC was created.
    databases List<GetVpcsVpcSubnetDatabase>
    A list of Managed Databases assigned to this subnet.
    id Integer
    The unique id of this VPC.
    ipv4 String
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    ipv6s List<GetVpcsVpcSubnetIpv6>
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    label String
    The label of the VPC.
    linodes List<GetVpcsVpcSubnetLinode>
    A list of Linodes assigned to this subnet.
    nodebalancers List<GetVpcsVpcSubnetNodebalancer>
    A list of NodeBalancers assigned to this subnet.
    updated String
    The date and time when the VPC was last updated.
    created string
    The date and time when the VPC was created.
    databases GetVpcsVpcSubnetDatabase[]
    A list of Managed Databases assigned to this subnet.
    id number
    The unique id of this VPC.
    ipv4 string
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    ipv6s GetVpcsVpcSubnetIpv6[]
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    label string
    The label of the VPC.
    linodes GetVpcsVpcSubnetLinode[]
    A list of Linodes assigned to this subnet.
    nodebalancers GetVpcsVpcSubnetNodebalancer[]
    A list of NodeBalancers assigned to this subnet.
    updated string
    The date and time when the VPC was last updated.
    created str
    The date and time when the VPC was created.
    databases Sequence[GetVpcsVpcSubnetDatabase]
    A list of Managed Databases assigned to this subnet.
    id int
    The unique id of this VPC.
    ipv4 str
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    ipv6s Sequence[GetVpcsVpcSubnetIpv6]
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    label str
    The label of the VPC.
    linodes Sequence[GetVpcsVpcSubnetLinode]
    A list of Linodes assigned to this subnet.
    nodebalancers Sequence[GetVpcsVpcSubnetNodebalancer]
    A list of NodeBalancers assigned to this subnet.
    updated str
    The date and time when the VPC was last updated.
    created String
    The date and time when the VPC was created.
    databases List<Property Map>
    A list of Managed Databases assigned to this subnet.
    id Number
    The unique id of this VPC.
    ipv4 String
    (Nested Attribute List) A list of IPv4 ranges under this VPC.
    ipv6s List<Property Map>
    (Nested Attribute List) A list of IPv6 allocations under this VPC.
    label String
    The label of the VPC.
    linodes List<Property Map>
    A list of Linodes assigned to this subnet.
    nodebalancers List<Property Map>
    A list of NodeBalancers assigned to this subnet.
    updated String
    The date and time when the VPC was last updated.

    GetVpcsVpcSubnetDatabase

    Id int
    The unique id of this VPC.
    Ipv4Range string
    Ipv6Ranges []GetVpcsVpcSubnetDatabaseIpv6Range
    id number
    The unique id of this VPC.
    ipv4_range string
    ipv6_ranges list(object)
    id Integer
    The unique id of this VPC.
    ipv4Range String
    ipv6Ranges List<GetVpcsVpcSubnetDatabaseIpv6Range>
    id number
    The unique id of this VPC.
    ipv4Range string
    ipv6Ranges GetVpcsVpcSubnetDatabaseIpv6Range[]
    id Number
    The unique id of this VPC.
    ipv4Range String
    ipv6Ranges List<Property Map>

    GetVpcsVpcSubnetDatabaseIpv6Range

    Range string
    Range string
    range string
    range String
    range string
    range str
    range String

    GetVpcsVpcSubnetIpv6

    Range string
    An IPv6 range allocated to this subnet.
    Range string
    An IPv6 range allocated to this subnet.
    range string
    An IPv6 range allocated to this subnet.
    range String
    An IPv6 range allocated to this subnet.
    range string
    An IPv6 range allocated to this subnet.
    range str
    An IPv6 range allocated to this subnet.
    range String
    An IPv6 range allocated to this subnet.

    GetVpcsVpcSubnetLinode

    Id int
    The unique id of this VPC.
    Interfaces []GetVpcsVpcSubnetLinodeInterface
    id number
    The unique id of this VPC.
    interfaces list(object)
    id Integer
    The unique id of this VPC.
    interfaces List<GetVpcsVpcSubnetLinodeInterface>
    id number
    The unique id of this VPC.
    interfaces GetVpcsVpcSubnetLinodeInterface[]
    id Number
    The unique id of this VPC.
    interfaces List<Property Map>

    GetVpcsVpcSubnetLinodeInterface

    Active bool
    ConfigId int
    Id int
    The unique id of this VPC.
    Active bool
    ConfigId int
    Id int
    The unique id of this VPC.
    active bool
    config_id number
    id number
    The unique id of this VPC.
    active Boolean
    configId Integer
    id Integer
    The unique id of this VPC.
    active boolean
    configId number
    id number
    The unique id of this VPC.
    active bool
    config_id int
    id int
    The unique id of this VPC.
    active Boolean
    configId Number
    id Number
    The unique id of this VPC.

    GetVpcsVpcSubnetNodebalancer

    id number
    The unique id of this VPC.
    ipv4_range string
    ipv6_ranges list(object)
    id number
    The unique id of this VPC.
    ipv4Range string
    ipv6Ranges GetVpcsVpcSubnetNodebalancerIpv6Range[]
    id Number
    The unique id of this VPC.
    ipv4Range String
    ipv6Ranges List<Property Map>

    GetVpcsVpcSubnetNodebalancerIpv6Range

    Range string
    Range string
    range string
    range String
    range string
    range str
    range String

    Package Details

    Repository
    Linode pulumi/pulumi-linode
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the linode Terraform Provider.
    linode logo linode logo
    Viewing docs for Linode v6.8.0
    published on Wednesday, Oct 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial