1. Registry
  2. Packages
  3. stackit
  4. API Docs
  5. VpnGateway
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

    VPN Gateway resource schema. Uses the defaultRegion specified in the provider configuration as a fallback in case no region is defined on resource level.

    Example Usage

    resource "stackit_vpn_gateway" "example" {
      project_id   = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      display_name = "example-vpn-gateway"
      plan_id      = "p500"
      routing_type = "ROUTE_BASED"
    
      availability_zones = {
        tunnel1 = "eu01-1"
        tunnel2 = "eu01-2"
      }
    }
    

    Create VpnGateway Resource

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

    Constructor syntax

    new VpnGateway(name: string, args: VpnGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def VpnGateway(resource_name: str,
                   args: VpnGatewayArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpnGateway(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   availability_zones: Optional[VpnGatewayAvailabilityZonesArgs] = None,
                   display_name: Optional[str] = None,
                   plan_id: Optional[str] = None,
                   project_id: Optional[str] = None,
                   routing_type: Optional[str] = None,
                   bgp: Optional[VpnGatewayBgpArgs] = None,
                   labels: Optional[Mapping[str, str]] = None,
                   region: Optional[str] = None)
    func NewVpnGateway(ctx *Context, name string, args VpnGatewayArgs, opts ...ResourceOption) (*VpnGateway, error)
    public VpnGateway(string name, VpnGatewayArgs args, CustomResourceOptions? opts = null)
    public VpnGateway(String name, VpnGatewayArgs args)
    public VpnGateway(String name, VpnGatewayArgs args, CustomResourceOptions options)
    
    type: stackit:VpnGateway
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "stackit_vpn_gateway" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args VpnGatewayArgs
    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 VpnGatewayArgs
    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 VpnGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpnGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpnGatewayArgs
    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 vpnGatewayResource = new Stackit.VpnGateway("vpnGatewayResource", new()
    {
        AvailabilityZones = new Stackit.Inputs.VpnGatewayAvailabilityZonesArgs
        {
            Tunnel1 = "string",
            Tunnel2 = "string",
        },
        DisplayName = "string",
        PlanId = "string",
        ProjectId = "string",
        RoutingType = "string",
        Bgp = new Stackit.Inputs.VpnGatewayBgpArgs
        {
            LocalAsn = 0,
            OverrideAdvertisedRoutes = new[]
            {
                "string",
            },
        },
        Labels = 
        {
            { "string", "string" },
        },
        Region = "string",
    });
    
    example, err := stackit.NewVpnGateway(ctx, "vpnGatewayResource", &stackit.VpnGatewayArgs{
    	AvailabilityZones: &stackit.VpnGatewayAvailabilityZonesArgs{
    		Tunnel1: pulumi.String("string"),
    		Tunnel2: pulumi.String("string"),
    	},
    	DisplayName: pulumi.String("string"),
    	PlanId:      pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    	RoutingType: pulumi.String("string"),
    	Bgp: &stackit.VpnGatewayBgpArgs{
    		LocalAsn: pulumi.Int(0),
    		OverrideAdvertisedRoutes: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Region: pulumi.String("string"),
    })
    
    resource "stackit_vpn_gateway" "vpnGatewayResource" {
      lifecycle {
        create_before_destroy = true
      }
      availability_zones = {
        tunnel1 = "string"
        tunnel2 = "string"
      }
      display_name = "string"
      plan_id      = "string"
      project_id   = "string"
      routing_type = "string"
      bgp = {
        local_asn                  = 0
        override_advertised_routes = ["string"]
      }
      labels = {
        "string" = "string"
      }
      region = "string"
    }
    
    var vpnGatewayResource = new VpnGateway("vpnGatewayResource", VpnGatewayArgs.builder()
        .availabilityZones(VpnGatewayAvailabilityZonesArgs.builder()
            .tunnel1("string")
            .tunnel2("string")
            .build())
        .displayName("string")
        .planId("string")
        .projectId("string")
        .routingType("string")
        .bgp(VpnGatewayBgpArgs.builder()
            .localAsn(0)
            .overrideAdvertisedRoutes("string")
            .build())
        .labels(Map.of("string", "string"))
        .region("string")
        .build());
    
    vpn_gateway_resource = stackit.VpnGateway("vpnGatewayResource",
        availability_zones={
            "tunnel1": "string",
            "tunnel2": "string",
        },
        display_name="string",
        plan_id="string",
        project_id="string",
        routing_type="string",
        bgp={
            "local_asn": 0,
            "override_advertised_routes": ["string"],
        },
        labels={
            "string": "string",
        },
        region="string")
    
    const vpnGatewayResource = new stackit.VpnGateway("vpnGatewayResource", {
        availabilityZones: {
            tunnel1: "string",
            tunnel2: "string",
        },
        displayName: "string",
        planId: "string",
        projectId: "string",
        routingType: "string",
        bgp: {
            localAsn: 0,
            overrideAdvertisedRoutes: ["string"],
        },
        labels: {
            string: "string",
        },
        region: "string",
    });
    
    type: stackit:VpnGateway
    properties:
        availabilityZones:
            tunnel1: string
            tunnel2: string
        bgp:
            localAsn: 0
            overrideAdvertisedRoutes:
                - string
        displayName: string
        labels:
            string: string
        planId: string
        projectId: string
        region: string
        routingType: string
    

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

    AvailabilityZones VpnGatewayAvailabilityZones
    Availability zones for the two tunnel endpoints.
    DisplayName string
    A user-friendly name for the VPN gateway.
    PlanId string
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    ProjectId string
    STACKIT project ID associated with the VPN gateway.
    RoutingType string
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    Bgp VpnGatewayBgp
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    Labels Dictionary<string, string>
    Map of custom labels (key-value string pairs).
    Region string
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    AvailabilityZones VpnGatewayAvailabilityZonesArgs
    Availability zones for the two tunnel endpoints.
    DisplayName string
    A user-friendly name for the VPN gateway.
    PlanId string
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    ProjectId string
    STACKIT project ID associated with the VPN gateway.
    RoutingType string
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    Bgp VpnGatewayBgpArgs
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    Labels map[string]string
    Map of custom labels (key-value string pairs).
    Region string
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    availability_zones object
    Availability zones for the two tunnel endpoints.
    display_name string
    A user-friendly name for the VPN gateway.
    plan_id string
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    project_id string
    STACKIT project ID associated with the VPN gateway.
    routing_type string
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    bgp object
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    labels map(string)
    Map of custom labels (key-value string pairs).
    region string
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    availabilityZones VpnGatewayAvailabilityZones
    Availability zones for the two tunnel endpoints.
    displayName String
    A user-friendly name for the VPN gateway.
    planId String
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    projectId String
    STACKIT project ID associated with the VPN gateway.
    routingType String
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    bgp VpnGatewayBgp
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    labels Map<String,String>
    Map of custom labels (key-value string pairs).
    region String
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    availabilityZones VpnGatewayAvailabilityZones
    Availability zones for the two tunnel endpoints.
    displayName string
    A user-friendly name for the VPN gateway.
    planId string
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    projectId string
    STACKIT project ID associated with the VPN gateway.
    routingType string
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    bgp VpnGatewayBgp
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    labels {[key: string]: string}
    Map of custom labels (key-value string pairs).
    region string
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    availability_zones VpnGatewayAvailabilityZonesArgs
    Availability zones for the two tunnel endpoints.
    display_name str
    A user-friendly name for the VPN gateway.
    plan_id str
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    project_id str
    STACKIT project ID associated with the VPN gateway.
    routing_type str
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    bgp VpnGatewayBgpArgs
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    labels Mapping[str, str]
    Map of custom labels (key-value string pairs).
    region str
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    availabilityZones Property Map
    Availability zones for the two tunnel endpoints.
    displayName String
    A user-friendly name for the VPN gateway.
    planId String
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    projectId String
    STACKIT project ID associated with the VPN gateway.
    routingType String
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    bgp Property Map
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    labels Map<String>
    Map of custom labels (key-value string pairs).
    region String
    STACKIT region name the resource is located in. If not defined, the provider region is used.

    Outputs

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

    GatewayId string
    The server-generated UUID of the VPN gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    GatewayId string
    The server-generated UUID of the VPN gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    gateway_id string
    The server-generated UUID of the VPN gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    gatewayId String
    The server-generated UUID of the VPN gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    gatewayId string
    The server-generated UUID of the VPN gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    gateway_id str
    The server-generated UUID of the VPN gateway.
    id str
    The provider-assigned unique ID for this managed resource.
    gatewayId String
    The server-generated UUID of the VPN gateway.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VpnGateway Resource

    Get an existing VpnGateway 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?: VpnGatewayState, opts?: CustomResourceOptions): VpnGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            availability_zones: Optional[VpnGatewayAvailabilityZonesArgs] = None,
            bgp: Optional[VpnGatewayBgpArgs] = None,
            display_name: Optional[str] = None,
            gateway_id: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            plan_id: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            routing_type: Optional[str] = None) -> VpnGateway
    func GetVpnGateway(ctx *Context, name string, id IDInput, state *VpnGatewayState, opts ...ResourceOption) (*VpnGateway, error)
    public static VpnGateway Get(string name, Input<string> id, VpnGatewayState? state, CustomResourceOptions? opts = null)
    public static VpnGateway get(String name, Output<String> id, VpnGatewayState state, CustomResourceOptions options)
    resources:  _:    type: stackit:VpnGateway    get:      id: ${id}
    import {
      to = stackit_vpn_gateway.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:
    AvailabilityZones VpnGatewayAvailabilityZones
    Availability zones for the two tunnel endpoints.
    Bgp VpnGatewayBgp
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    DisplayName string
    A user-friendly name for the VPN gateway.
    GatewayId string
    The server-generated UUID of the VPN gateway.
    Labels Dictionary<string, string>
    Map of custom labels (key-value string pairs).
    PlanId string
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    ProjectId string
    STACKIT project ID associated with the VPN gateway.
    Region string
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    RoutingType string
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    AvailabilityZones VpnGatewayAvailabilityZonesArgs
    Availability zones for the two tunnel endpoints.
    Bgp VpnGatewayBgpArgs
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    DisplayName string
    A user-friendly name for the VPN gateway.
    GatewayId string
    The server-generated UUID of the VPN gateway.
    Labels map[string]string
    Map of custom labels (key-value string pairs).
    PlanId string
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    ProjectId string
    STACKIT project ID associated with the VPN gateway.
    Region string
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    RoutingType string
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    availability_zones object
    Availability zones for the two tunnel endpoints.
    bgp object
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    display_name string
    A user-friendly name for the VPN gateway.
    gateway_id string
    The server-generated UUID of the VPN gateway.
    labels map(string)
    Map of custom labels (key-value string pairs).
    plan_id string
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    project_id string
    STACKIT project ID associated with the VPN gateway.
    region string
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    routing_type string
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    availabilityZones VpnGatewayAvailabilityZones
    Availability zones for the two tunnel endpoints.
    bgp VpnGatewayBgp
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    displayName String
    A user-friendly name for the VPN gateway.
    gatewayId String
    The server-generated UUID of the VPN gateway.
    labels Map<String,String>
    Map of custom labels (key-value string pairs).
    planId String
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    projectId String
    STACKIT project ID associated with the VPN gateway.
    region String
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    routingType String
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    availabilityZones VpnGatewayAvailabilityZones
    Availability zones for the two tunnel endpoints.
    bgp VpnGatewayBgp
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    displayName string
    A user-friendly name for the VPN gateway.
    gatewayId string
    The server-generated UUID of the VPN gateway.
    labels {[key: string]: string}
    Map of custom labels (key-value string pairs).
    planId string
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    projectId string
    STACKIT project ID associated with the VPN gateway.
    region string
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    routingType string
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    availability_zones VpnGatewayAvailabilityZonesArgs
    Availability zones for the two tunnel endpoints.
    bgp VpnGatewayBgpArgs
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    display_name str
    A user-friendly name for the VPN gateway.
    gateway_id str
    The server-generated UUID of the VPN gateway.
    labels Mapping[str, str]
    Map of custom labels (key-value string pairs).
    plan_id str
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    project_id str
    STACKIT project ID associated with the VPN gateway.
    region str
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    routing_type str
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.
    availabilityZones Property Map
    Availability zones for the two tunnel endpoints.
    bgp Property Map
    BGP configuration. Only applicable when routingtype is BGPROUTE_BASED.
    displayName String
    A user-friendly name for the VPN gateway.
    gatewayId String
    The server-generated UUID of the VPN gateway.
    labels Map<String>
    Map of custom labels (key-value string pairs).
    planId String
    The service plan identifier (e.g. p500). For guidance on finding available plans, see List available service plans.
    projectId String
    STACKIT project ID associated with the VPN gateway.
    region String
    STACKIT region name the resource is located in. If not defined, the provider region is used.
    routingType String
    Routing architecture. Possible values are: POLICY_BASED, ROUTE_BASED, BGP_ROUTE_BASED.

    Supporting Types

    VpnGatewayAvailabilityZones, VpnGatewayAvailabilityZonesArgs

    Tunnel1 string
    Availability zone for tunnel 1.
    Tunnel2 string
    Availability zone for tunnel 2.
    Tunnel1 string
    Availability zone for tunnel 1.
    Tunnel2 string
    Availability zone for tunnel 2.
    tunnel1 string
    Availability zone for tunnel 1.
    tunnel2 string
    Availability zone for tunnel 2.
    tunnel1 String
    Availability zone for tunnel 1.
    tunnel2 String
    Availability zone for tunnel 2.
    tunnel1 string
    Availability zone for tunnel 1.
    tunnel2 string
    Availability zone for tunnel 2.
    tunnel1 str
    Availability zone for tunnel 1.
    tunnel2 str
    Availability zone for tunnel 2.
    tunnel1 String
    Availability zone for tunnel 1.
    tunnel2 String
    Availability zone for tunnel 2.

    VpnGatewayBgp, VpnGatewayBgpArgs

    LocalAsn int
    Local ASN for BGP (private ASN range, 64512-4294967294).
    OverrideAdvertisedRoutes List<string>
    List of IPv4 CIDRs to advertise via BGP. If omitted, SNA network ranges are advertised.
    LocalAsn int
    Local ASN for BGP (private ASN range, 64512-4294967294).
    OverrideAdvertisedRoutes []string
    List of IPv4 CIDRs to advertise via BGP. If omitted, SNA network ranges are advertised.
    local_asn number
    Local ASN for BGP (private ASN range, 64512-4294967294).
    override_advertised_routes list(string)
    List of IPv4 CIDRs to advertise via BGP. If omitted, SNA network ranges are advertised.
    localAsn Integer
    Local ASN for BGP (private ASN range, 64512-4294967294).
    overrideAdvertisedRoutes List<String>
    List of IPv4 CIDRs to advertise via BGP. If omitted, SNA network ranges are advertised.
    localAsn number
    Local ASN for BGP (private ASN range, 64512-4294967294).
    overrideAdvertisedRoutes string[]
    List of IPv4 CIDRs to advertise via BGP. If omitted, SNA network ranges are advertised.
    local_asn int
    Local ASN for BGP (private ASN range, 64512-4294967294).
    override_advertised_routes Sequence[str]
    List of IPv4 CIDRs to advertise via BGP. If omitted, SNA network ranges are advertised.
    localAsn Number
    Local ASN for BGP (private ASN range, 64512-4294967294).
    overrideAdvertisedRoutes List<String>
    List of IPv4 CIDRs to advertise via BGP. If omitted, SNA network ranges are advertised.

    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 VPN gateway
    import {
      to = stackit_vpn_gateway.example
      id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,eu01,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    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