published on Monday, Aug 17, 2026 by stackitcloud
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:
- Availability
Zones VpnGateway Availability Zones - 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
Vpn
Gateway Bgp - 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.
- Availability
Zones VpnGateway Availability Zones Args - 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
Vpn
Gateway Bgp Args - 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.
- availability
Zones VpnGateway Availability Zones - 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
Vpn
Gateway Bgp - 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 VpnGateway Availability Zones - 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
Vpn
Gateway Bgp - 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 VpnGateway Availability Zones Args - 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
Vpn
Gateway Bgp Args - 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.
- availability
Zones Property Map - 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 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:
- gateway_
id 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.
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) -> VpnGatewayfunc 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.
- Availability
Zones VpnGateway Availability Zones - Availability zones for the two tunnel endpoints.
- Bgp
Vpn
Gateway Bgp - 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 Dictionary<string, 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.
- Availability
Zones VpnGateway Availability Zones Args - Availability zones for the two tunnel endpoints.
- Bgp
Vpn
Gateway Bgp Args - 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]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.
- 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.
- availability
Zones VpnGateway Availability Zones - Availability zones for the two tunnel endpoints.
- bgp
Vpn
Gateway Bgp - 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,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.
- availability
Zones VpnGateway Availability Zones - Availability zones for the two tunnel endpoints.
- bgp
Vpn
Gateway Bgp - 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 {[key: string]: 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.
- availability_
zones VpnGateway Availability Zones Args - Availability zones for the two tunnel endpoints.
- bgp
Vpn
Gateway Bgp Args - 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.
- availability
Zones Property Map - Availability zones for the two tunnel endpoints.
- bgp Property Map
- 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.
Supporting Types
VpnGatewayAvailabilityZones, VpnGatewayAvailabilityZonesArgs
VpnGatewayBgp, VpnGatewayBgpArgs
- Local
Asn int - Local ASN for BGP (private ASN range, 64512-4294967294).
- Override
Advertised List<string>Routes - 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 []stringRoutes - 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_ list(string)routes - List of IPv4 CIDRs to advertise via BGP. If omitted, SNA network ranges are advertised.
- local
Asn Integer - Local ASN for BGP (private ASN range, 64512-4294967294).
- override
Advertised List<String>Routes - 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 string[]Routes - 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_ Sequence[str]routes - 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 List<String>Routes - 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
stackitTerraform Provider.
published on Monday, Aug 17, 2026 by stackitcloud