1. Packages
  2. Linode
  3. API Docs
  4. Vpc
Linode v4.19.0 published on Wednesday, Apr 24, 2024 by Pulumi

linode.Vpc

Explore with Pulumi AI

linode logo
Linode v4.19.0 published on Wednesday, Apr 24, 2024 by Pulumi

    Manages a Linode VPC.

    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/v4/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 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)
    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.

    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",
    });
    
    example, err := linode.NewVpc(ctx, "vpcResource", &linode.VpcArgs{
    	Label:       pulumi.String("string"),
    	Region:      pulumi.String("string"),
    	Description: pulumi.String("string"),
    })
    
    var vpcResource = new Vpc("vpcResource", VpcArgs.builder()        
        .label("string")
        .region("string")
        .description("string")
        .build());
    
    vpc_resource = linode.Vpc("vpcResource",
        label="string",
        region="string",
        description="string")
    
    const vpcResource = new linode.Vpc("vpcResource", {
        label: "string",
        region: "string",
        description: "string",
    });
    
    type: linode:Vpc
    properties:
        description: 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

    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.
    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.
    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.
    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.
    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.
    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.

    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,
            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)
    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:
    Created string
    The date and time when the VPC was created.
    Description string
    The user-defined description 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.
    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.
    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.
    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.
    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.
    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.

    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 v4.19.0 published on Wednesday, Apr 24, 2024 by Pulumi