1. Packages
  2. Linode Provider
  3. API Docs
  4. Vpc
Linode v5.4.0 published on Friday, Oct 10, 2025 by Pulumi

linode.Vpc

Get Started
linode logo
Linode v5.4.0 published on Friday, Oct 10, 2025 by Pulumi

    Manages a Linode VPC. For more information, see the Linode APIv4 docs.

    Please refer to linode.VpcSubnet to manage the subnets under a Linode VPC.

    Example Usage

    Create a VPC:

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const test = new linode.Vpc("test", {
        label: "test-vpc",
        region: "us-iad",
        description: "My first VPC.",
    });
    
    import pulumi
    import pulumi_linode as linode
    
    test = linode.Vpc("test",
        label="test-vpc",
        region="us-iad",
        description="My first VPC.")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v5/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := linode.NewVpc(ctx, "test", &linode.VpcArgs{
    			Label:       pulumi.String("test-vpc"),
    			Region:      pulumi.String("us-iad"),
    			Description: pulumi.String("My first VPC."),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Linode.Vpc("test", new()
        {
            Label = "test-vpc",
            Region = "us-iad",
            Description = "My first VPC.",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.Vpc;
    import com.pulumi.linode.VpcArgs;
    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 Vpc("test", VpcArgs.builder()
                .label("test-vpc")
                .region("us-iad")
                .description("My first VPC.")
                .build());
    
        }
    }
    
    resources:
      test:
        type: linode:Vpc
        properties:
          label: test-vpc
          region: us-iad
          description: My first VPC.
    

    Create a VPC with a /52 IPv6 range prefix:

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    // NOTE: IPv6 VPCs may not currently be available to all users.
    const test = new linode.Vpc("test", {
        label: "test-vpc",
        region: "us-iad",
        ipv6s: [{
            range: "/52",
        }],
    });
    
    import pulumi
    import pulumi_linode as linode
    
    # NOTE: IPv6 VPCs may not currently be available to all users.
    test = linode.Vpc("test",
        label="test-vpc",
        region="us-iad",
        ipv6s=[{
            "range": "/52",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v5/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// NOTE: IPv6 VPCs may not currently be available to all users.
    		_, err := linode.NewVpc(ctx, "test", &linode.VpcArgs{
    			Label:  pulumi.String("test-vpc"),
    			Region: pulumi.String("us-iad"),
    			Ipv6s: linode.VpcIpv6Array{
    				&linode.VpcIpv6Args{
    					Range: pulumi.String("/52"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        // NOTE: IPv6 VPCs may not currently be available to all users.
        var test = new Linode.Vpc("test", new()
        {
            Label = "test-vpc",
            Region = "us-iad",
            Ipv6s = new[]
            {
                new Linode.Inputs.VpcIpv6Args
                {
                    Range = "/52",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.Vpc;
    import com.pulumi.linode.VpcArgs;
    import com.pulumi.linode.inputs.VpcIpv6Args;
    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) {
            // NOTE: IPv6 VPCs may not currently be available to all users.
            var test = new Vpc("test", VpcArgs.builder()
                .label("test-vpc")
                .region("us-iad")
                .ipv6s(VpcIpv6Args.builder()
                    .range("/52")
                    .build())
                .build());
    
        }
    }
    
    resources:
      # NOTE: IPv6 VPCs may not currently be available to all users.
      test:
        type: linode:Vpc
        properties:
          label: test-vpc
          region: us-iad
          ipv6s:
            - range: /52
    

    IPv6

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

    Configures a single IPv6 range under this VPC.

    • range - (Optional) An existing IPv6 prefix owned by the current account or a forward slash (/) followed by a valid prefix length. If unspecified, a range with the default prefix will be allocated for this VPC.

    • allocation_class - (Optional) Indicates the labeled IPv6 Inventory that the VPC Prefix should be allocated from.

    • allocated_range - (Read-Only) The value of range computed by the API. This is necessary when needing to access the range for an implicit allocation.

    Create Vpc Resource

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

    Constructor syntax

    new Vpc(name: string, args: VpcArgs, opts?: CustomResourceOptions);
    @overload
    def Vpc(resource_name: str,
            args: VpcArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Vpc(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            label: Optional[str] = None,
            region: Optional[str] = None,
            description: Optional[str] = None,
            ipv6s: Optional[Sequence[VpcIpv6Args]] = None)
    func NewVpc(ctx *Context, name string, args VpcArgs, opts ...ResourceOption) (*Vpc, error)
    public Vpc(string name, VpcArgs args, CustomResourceOptions? opts = null)
    public Vpc(String name, VpcArgs args)
    public Vpc(String name, VpcArgs args, CustomResourceOptions options)
    
    type: linode:Vpc
    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 VpcArgs
    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 VpcArgs
    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 VpcArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcArgs
    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 vpcResource = new Linode.Vpc("vpcResource", new()
    {
        Label = "string",
        Region = "string",
        Description = "string",
        Ipv6s = new[]
        {
            new Linode.Inputs.VpcIpv6Args
            {
                AllocatedRange = "string",
                Range = "string",
            },
        },
    });
    
    example, err := linode.NewVpc(ctx, "vpcResource", &linode.VpcArgs{
    	Label:       pulumi.String("string"),
    	Region:      pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Ipv6s: linode.VpcIpv6Array{
    		&linode.VpcIpv6Args{
    			AllocatedRange: pulumi.String("string"),
    			Range:          pulumi.String("string"),
    		},
    	},
    })
    
    var vpcResource = new Vpc("vpcResource", VpcArgs.builder()
        .label("string")
        .region("string")
        .description("string")
        .ipv6s(VpcIpv6Args.builder()
            .allocatedRange("string")
            .range("string")
            .build())
        .build());
    
    vpc_resource = linode.Vpc("vpcResource",
        label="string",
        region="string",
        description="string",
        ipv6s=[{
            "allocated_range": "string",
            "range": "string",
        }])
    
    const vpcResource = new linode.Vpc("vpcResource", {
        label: "string",
        region: "string",
        description: "string",
        ipv6s: [{
            allocatedRange: "string",
            range: "string",
        }],
    });
    
    type: linode:Vpc
    properties:
        description: string
        ipv6s:
            - allocatedRange: string
              range: string
        label: string
        region: string
    

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

    Label string
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    Region string
    The region of the VPC.
    Description string
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    Ipv6s List<VpcIpv6>
    The IPv6 configuration of this VPC.
    Label string
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    Region string
    The region of the VPC.
    Description string
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    Ipv6s []VpcIpv6Args
    The IPv6 configuration of this VPC.
    label String
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    region String
    The region of the VPC.
    description String
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    ipv6s List<VpcIpv6>
    The IPv6 configuration of this VPC.
    label string
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    region string
    The region of the VPC.
    description string
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    ipv6s VpcIpv6[]
    The IPv6 configuration of this VPC.
    label str
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    region str
    The region of the VPC.
    description str
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    ipv6s Sequence[VpcIpv6Args]
    The IPv6 configuration of this VPC.
    label String
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    region String
    The region of the VPC.
    description String
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    ipv6s List<Property Map>
    The IPv6 configuration of this VPC.

    Outputs

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

    Created string
    The date and time when the VPC was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Updated string
    The date and time when the VPC was last updated.
    Created string
    The date and time when the VPC was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Updated string
    The date and time when the VPC was last updated.
    created String
    The date and time when the VPC was created.
    id String
    The provider-assigned unique ID for this managed resource.
    updated String
    The date and time when the VPC was last updated.
    created string
    The date and time when the VPC was created.
    id string
    The provider-assigned unique ID for this managed resource.
    updated string
    The date and time when the VPC was last updated.
    created str
    The date and time when the VPC was created.
    id str
    The provider-assigned unique ID for this managed resource.
    updated str
    The date and time when the VPC was last updated.
    created String
    The date and time when the VPC was created.
    id String
    The provider-assigned unique ID for this managed resource.
    updated String
    The date and time when the VPC was last updated.

    Look up Existing Vpc Resource

    Get an existing Vpc 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?: VpcState, opts?: CustomResourceOptions): Vpc
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created: Optional[str] = None,
            description: Optional[str] = None,
            ipv6s: Optional[Sequence[VpcIpv6Args]] = None,
            label: Optional[str] = None,
            region: Optional[str] = None,
            updated: Optional[str] = None) -> Vpc
    func GetVpc(ctx *Context, name string, id IDInput, state *VpcState, opts ...ResourceOption) (*Vpc, error)
    public static Vpc Get(string name, Input<string> id, VpcState? state, CustomResourceOptions? opts = null)
    public static Vpc get(String name, Output<String> id, VpcState state, CustomResourceOptions options)
    resources:  _:    type: linode:Vpc    get:      id: ${id}
    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:
    Created string
    The date and time when the VPC was created.
    Description string
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    Ipv6s List<VpcIpv6>
    The IPv6 configuration of this VPC.
    Label string
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    Region string
    The region of the VPC.
    Updated string
    The date and time when the VPC was last updated.
    Created string
    The date and time when the VPC was created.
    Description string
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    Ipv6s []VpcIpv6Args
    The IPv6 configuration of this VPC.
    Label string
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    Region string
    The region of the VPC.
    Updated string
    The date and time when the VPC was last updated.
    created String
    The date and time when the VPC was created.
    description String
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    ipv6s List<VpcIpv6>
    The IPv6 configuration of this VPC.
    label String
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    region String
    The region of the VPC.
    updated String
    The date and time when the VPC was last updated.
    created string
    The date and time when the VPC was created.
    description string
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    ipv6s VpcIpv6[]
    The IPv6 configuration of this VPC.
    label string
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    region string
    The region of the VPC.
    updated string
    The date and time when the VPC was last updated.
    created str
    The date and time when the VPC was created.
    description str
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    ipv6s Sequence[VpcIpv6Args]
    The IPv6 configuration of this VPC.
    label str
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    region str
    The region of the VPC.
    updated str
    The date and time when the VPC was last updated.
    created String
    The date and time when the VPC was created.
    description String
    The user-defined description of this VPC.

    • ipv6 - (Optional) A list of IPv6 allocations under this VPC.
    ipv6s List<Property Map>
    The IPv6 configuration of this VPC.
    label String
    The label of the VPC. This field can only contain ASCII letters, digits and dashes.
    region String
    The region of the VPC.
    updated String
    The date and time when the VPC was last updated.

    Supporting Types

    VpcIpv6, VpcIpv6Args

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

    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 v5.4.0 published on Friday, Oct 10, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate