1. Registry
  2. Packages
  3. stackit
  4. API Docs
  5. Vpc
Viewing docs for stackit v0.0.7
published on Monday, Aug 17, 2026 by stackitcloud
stackit logo
Viewing docs for stackit v0.0.7
published on Monday, Aug 17, 2026 by stackitcloud

    VPC resource schema.

    This resource is part of the experimental feature vpc and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.

    Example Usage

    resource "stackit_vpc" "example" {
      project_id  = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      name        = "example"
      description = "Example description"
      labels = {
        "key" = "value"
      }
    }
    

    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,
            description: Optional[str] = None,
            project_id: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            timeouts: Optional[VpcTimeoutsArgs] = 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: stackit:Vpc
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "stackit_vpc" "name" {
        # resource properties
    }

    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 Stackit.Vpc("vpcResource", new()
    {
        Description = "string",
        ProjectId = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Name = "string",
        Timeouts = new Stackit.Inputs.VpcTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Read = "string",
            Update = "string",
        },
    });
    
    example, err := stackit.NewVpc(ctx, "vpcResource", &stackit.VpcArgs{
    	Description: pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	Timeouts: &stackit.VpcTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Read:   pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    resource "stackit_vpc" "vpcResource" {
      lifecycle {
        create_before_destroy = true
      }
      description = "string"
      project_id  = "string"
      labels = {
        "string" = "string"
      }
      name = "string"
      timeouts = {
        create = "string"
        delete = "string"
        read   = "string"
        update = "string"
      }
    }
    
    var vpcResource = new Vpc("vpcResource", VpcArgs.builder()
        .description("string")
        .projectId("string")
        .labels(Map.of("string", "string"))
        .name("string")
        .timeouts(VpcTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .read("string")
            .update("string")
            .build())
        .build());
    
    vpc_resource = stackit.Vpc("vpcResource",
        description="string",
        project_id="string",
        labels={
            "string": "string",
        },
        name="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "read": "string",
            "update": "string",
        })
    
    const vpcResource = new stackit.Vpc("vpcResource", {
        description: "string",
        projectId: "string",
        labels: {
            string: "string",
        },
        name: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            read: "string",
            update: "string",
        },
    });
    
    type: stackit:Vpc
    properties:
        description: string
        labels:
            string: string
        name: string
        projectId: string
        timeouts:
            create: string
            delete: string
            read: string
            update: 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:

    Description string
    The description of the VPC.
    ProjectId string
    STACKIT project ID to which the VPC is associated.
    Labels Dictionary<string, string>
    Labels are key-value string pairs which can be attached to a resource container
    Name string
    The name of the VPC.
    Timeouts VpcTimeouts
    Description string
    The description of the VPC.
    ProjectId string
    STACKIT project ID to which the VPC is associated.
    Labels map[string]string
    Labels are key-value string pairs which can be attached to a resource container
    Name string
    The name of the VPC.
    Timeouts VpcTimeoutsArgs
    description string
    The description of the VPC.
    project_id string
    STACKIT project ID to which the VPC is associated.
    labels map(string)
    Labels are key-value string pairs which can be attached to a resource container
    name string
    The name of the VPC.
    timeouts object
    description String
    The description of the VPC.
    projectId String
    STACKIT project ID to which the VPC is associated.
    labels Map<String,String>
    Labels are key-value string pairs which can be attached to a resource container
    name String
    The name of the VPC.
    timeouts VpcTimeouts
    description string
    The description of the VPC.
    projectId string
    STACKIT project ID to which the VPC is associated.
    labels {[key: string]: string}
    Labels are key-value string pairs which can be attached to a resource container
    name string
    The name of the VPC.
    timeouts VpcTimeouts
    description str
    The description of the VPC.
    project_id str
    STACKIT project ID to which the VPC is associated.
    labels Mapping[str, str]
    Labels are key-value string pairs which can be attached to a resource container
    name str
    The name of the VPC.
    timeouts VpcTimeoutsArgs
    description String
    The description of the VPC.
    projectId String
    STACKIT project ID to which the VPC is associated.
    labels Map<String>
    Labels are key-value string pairs which can be attached to a resource container
    name String
    The name of the VPC.
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    VpcId string
    The VPC ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    VpcId string
    The VPC ID.
    id string
    The provider-assigned unique ID for this managed resource.
    vpc_id string
    The VPC ID.
    id String
    The provider-assigned unique ID for this managed resource.
    vpcId String
    The VPC ID.
    id string
    The provider-assigned unique ID for this managed resource.
    vpcId string
    The VPC ID.
    id str
    The provider-assigned unique ID for this managed resource.
    vpc_id str
    The VPC ID.
    id String
    The provider-assigned unique ID for this managed resource.
    vpcId String
    The VPC ID.

    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,
            description: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            timeouts: Optional[VpcTimeoutsArgs] = None,
            vpc_id: 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: stackit:Vpc    get:      id: ${id}
    import {
      to = stackit_vpc.example
      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:
    Description string
    The description of the VPC.
    Labels Dictionary<string, string>
    Labels are key-value string pairs which can be attached to a resource container
    Name string
    The name of the VPC.
    ProjectId string
    STACKIT project ID to which the VPC is associated.
    Timeouts VpcTimeouts
    VpcId string
    The VPC ID.
    Description string
    The description of the VPC.
    Labels map[string]string
    Labels are key-value string pairs which can be attached to a resource container
    Name string
    The name of the VPC.
    ProjectId string
    STACKIT project ID to which the VPC is associated.
    Timeouts VpcTimeoutsArgs
    VpcId string
    The VPC ID.
    description string
    The description of the VPC.
    labels map(string)
    Labels are key-value string pairs which can be attached to a resource container
    name string
    The name of the VPC.
    project_id string
    STACKIT project ID to which the VPC is associated.
    timeouts object
    vpc_id string
    The VPC ID.
    description String
    The description of the VPC.
    labels Map<String,String>
    Labels are key-value string pairs which can be attached to a resource container
    name String
    The name of the VPC.
    projectId String
    STACKIT project ID to which the VPC is associated.
    timeouts VpcTimeouts
    vpcId String
    The VPC ID.
    description string
    The description of the VPC.
    labels {[key: string]: string}
    Labels are key-value string pairs which can be attached to a resource container
    name string
    The name of the VPC.
    projectId string
    STACKIT project ID to which the VPC is associated.
    timeouts VpcTimeouts
    vpcId string
    The VPC ID.
    description str
    The description of the VPC.
    labels Mapping[str, str]
    Labels are key-value string pairs which can be attached to a resource container
    name str
    The name of the VPC.
    project_id str
    STACKIT project ID to which the VPC is associated.
    timeouts VpcTimeoutsArgs
    vpc_id str
    The VPC ID.
    description String
    The description of the VPC.
    labels Map<String>
    Labels are key-value string pairs which can be attached to a resource container
    name String
    The name of the VPC.
    projectId String
    STACKIT project ID to which the VPC is associated.
    timeouts Property Map
    vpcId String
    The VPC ID.

    Supporting Types

    VpcTimeouts, VpcTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    In Terraform v1.5.0 and later, the + "" + import + “" + block can be used with the + "” + id + “" + attribute, for example:

    # Only use the import statement, if you want to import an existing vpc
    import {
      to = stackit_vpc.import-example
      id = "${var.project_id},${var.vpc_id}"
    }
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    stackit stackitcloud/pulumi-stackit
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the stackit Terraform Provider.
    stackit logo
    Viewing docs for stackit v0.0.7
    published on Monday, Aug 17, 2026 by stackitcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial