1. Packages
  2. Outscale Provider
  3. API Docs
  4. VpnConnectionRoute
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

outscale.VpnConnectionRoute

Explore with Pulumi AI

Manages a VPN connection route.

For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.

Example Usage

Required resources

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const clientGateway01 = new outscale.ClientGateway("clientGateway01", {
    bgpAsn: 65000,
    publicIp: "111.11.11.111",
    connectionType: "ipsec.1",
});
const virtualGateway01 = new outscale.VirtualGateway("virtualGateway01", {connectionType: "ipsec.1"});
const vpnConnection01 = new outscale.VpnConnection("vpnConnection01", {
    clientGatewayId: clientGateway01.clientGatewayId,
    virtualGatewayId: virtualGateway01.virtualGatewayId,
    connectionType: "ipsec.1",
    staticRoutesOnly: true,
});
Copy
import pulumi
import pulumi_outscale as outscale

client_gateway01 = outscale.ClientGateway("clientGateway01",
    bgp_asn=65000,
    public_ip="111.11.11.111",
    connection_type="ipsec.1")
virtual_gateway01 = outscale.VirtualGateway("virtualGateway01", connection_type="ipsec.1")
vpn_connection01 = outscale.VpnConnection("vpnConnection01",
    client_gateway_id=client_gateway01.client_gateway_id,
    virtual_gateway_id=virtual_gateway01.virtual_gateway_id,
    connection_type="ipsec.1",
    static_routes_only=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		clientGateway01, err := outscale.NewClientGateway(ctx, "clientGateway01", &outscale.ClientGatewayArgs{
			BgpAsn:         pulumi.Float64(65000),
			PublicIp:       pulumi.String("111.11.11.111"),
			ConnectionType: pulumi.String("ipsec.1"),
		})
		if err != nil {
			return err
		}
		virtualGateway01, err := outscale.NewVirtualGateway(ctx, "virtualGateway01", &outscale.VirtualGatewayArgs{
			ConnectionType: pulumi.String("ipsec.1"),
		})
		if err != nil {
			return err
		}
		_, err = outscale.NewVpnConnection(ctx, "vpnConnection01", &outscale.VpnConnectionArgs{
			ClientGatewayId:  clientGateway01.ClientGatewayId,
			VirtualGatewayId: virtualGateway01.VirtualGatewayId,
			ConnectionType:   pulumi.String("ipsec.1"),
			StaticRoutesOnly: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var clientGateway01 = new Outscale.ClientGateway("clientGateway01", new()
    {
        BgpAsn = 65000,
        PublicIp = "111.11.11.111",
        ConnectionType = "ipsec.1",
    });

    var virtualGateway01 = new Outscale.VirtualGateway("virtualGateway01", new()
    {
        ConnectionType = "ipsec.1",
    });

    var vpnConnection01 = new Outscale.VpnConnection("vpnConnection01", new()
    {
        ClientGatewayId = clientGateway01.ClientGatewayId,
        VirtualGatewayId = virtualGateway01.VirtualGatewayId,
        ConnectionType = "ipsec.1",
        StaticRoutesOnly = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.ClientGateway;
import com.pulumi.outscale.ClientGatewayArgs;
import com.pulumi.outscale.VirtualGateway;
import com.pulumi.outscale.VirtualGatewayArgs;
import com.pulumi.outscale.VpnConnection;
import com.pulumi.outscale.VpnConnectionArgs;
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 clientGateway01 = new ClientGateway("clientGateway01", ClientGatewayArgs.builder()
            .bgpAsn(65000)
            .publicIp("111.11.11.111")
            .connectionType("ipsec.1")
            .build());

        var virtualGateway01 = new VirtualGateway("virtualGateway01", VirtualGatewayArgs.builder()
            .connectionType("ipsec.1")
            .build());

        var vpnConnection01 = new VpnConnection("vpnConnection01", VpnConnectionArgs.builder()
            .clientGatewayId(clientGateway01.clientGatewayId())
            .virtualGatewayId(virtualGateway01.virtualGatewayId())
            .connectionType("ipsec.1")
            .staticRoutesOnly(true)
            .build());

    }
}
Copy
resources:
  clientGateway01:
    type: outscale:ClientGateway
    properties:
      bgpAsn: 65000
      publicIp: 111.11.11.111
      connectionType: ipsec.1
  virtualGateway01:
    type: outscale:VirtualGateway
    properties:
      connectionType: ipsec.1
  vpnConnection01:
    type: outscale:VpnConnection
    properties:
      clientGatewayId: ${clientGateway01.clientGatewayId}
      virtualGatewayId: ${virtualGateway01.virtualGatewayId}
      connectionType: ipsec.1
      staticRoutesOnly: true
Copy

Create a static route to a VPN connection

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const vpnConnectionRoute01 = new outscale.VpnConnectionRoute("vpnConnectionRoute01", {
    vpnConnectionId: outscale_vpn_connection.vpn_connection01.vpn_connection_id,
    destinationIpRange: "10.0.0.0/16",
});
Copy
import pulumi
import pulumi_outscale as outscale

vpn_connection_route01 = outscale.VpnConnectionRoute("vpnConnectionRoute01",
    vpn_connection_id=outscale_vpn_connection["vpn_connection01"]["vpn_connection_id"],
    destination_ip_range="10.0.0.0/16")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.NewVpnConnectionRoute(ctx, "vpnConnectionRoute01", &outscale.VpnConnectionRouteArgs{
			VpnConnectionId:    pulumi.Any(outscale_vpn_connection.Vpn_connection01.Vpn_connection_id),
			DestinationIpRange: pulumi.String("10.0.0.0/16"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var vpnConnectionRoute01 = new Outscale.VpnConnectionRoute("vpnConnectionRoute01", new()
    {
        VpnConnectionId = outscale_vpn_connection.Vpn_connection01.Vpn_connection_id,
        DestinationIpRange = "10.0.0.0/16",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.VpnConnectionRoute;
import com.pulumi.outscale.VpnConnectionRouteArgs;
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 vpnConnectionRoute01 = new VpnConnectionRoute("vpnConnectionRoute01", VpnConnectionRouteArgs.builder()
            .vpnConnectionId(outscale_vpn_connection.vpn_connection01().vpn_connection_id())
            .destinationIpRange("10.0.0.0/16")
            .build());

    }
}
Copy
resources:
  vpnConnectionRoute01:
    type: outscale:VpnConnectionRoute
    properties:
      vpnConnectionId: ${outscale_vpn_connection.vpn_connection01.vpn_connection_id}
      destinationIpRange: 10.0.0.0/16
Copy

Create VpnConnectionRoute Resource

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

Constructor syntax

new VpnConnectionRoute(name: string, args: VpnConnectionRouteArgs, opts?: CustomResourceOptions);
@overload
def VpnConnectionRoute(resource_name: str,
                       args: VpnConnectionRouteInitArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def VpnConnectionRoute(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       destination_ip_range: Optional[str] = None,
                       vpn_connection_id: Optional[str] = None,
                       vpn_connection_route_id: Optional[str] = None)
func NewVpnConnectionRoute(ctx *Context, name string, args VpnConnectionRouteArgs, opts ...ResourceOption) (*VpnConnectionRoute, error)
public VpnConnectionRoute(string name, VpnConnectionRouteArgs args, CustomResourceOptions? opts = null)
public VpnConnectionRoute(String name, VpnConnectionRouteArgs args)
public VpnConnectionRoute(String name, VpnConnectionRouteArgs args, CustomResourceOptions options)
type: outscale:VpnConnectionRoute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VpnConnectionRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VpnConnectionRouteInitArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VpnConnectionRouteArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VpnConnectionRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VpnConnectionRouteArgs
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 vpnConnectionRouteResource = new Outscale.VpnConnectionRoute("vpnConnectionRouteResource", new()
{
    DestinationIpRange = "string",
    VpnConnectionId = "string",
    VpnConnectionRouteId = "string",
});
Copy
example, err := outscale.NewVpnConnectionRoute(ctx, "vpnConnectionRouteResource", &outscale.VpnConnectionRouteArgs{
DestinationIpRange: pulumi.String("string"),
VpnConnectionId: pulumi.String("string"),
VpnConnectionRouteId: pulumi.String("string"),
})
Copy
var vpnConnectionRouteResource = new VpnConnectionRoute("vpnConnectionRouteResource", VpnConnectionRouteArgs.builder()
    .destinationIpRange("string")
    .vpnConnectionId("string")
    .vpnConnectionRouteId("string")
    .build());
Copy
vpn_connection_route_resource = outscale.VpnConnectionRoute("vpnConnectionRouteResource",
    destination_ip_range="string",
    vpn_connection_id="string",
    vpn_connection_route_id="string")
Copy
const vpnConnectionRouteResource = new outscale.VpnConnectionRoute("vpnConnectionRouteResource", {
    destinationIpRange: "string",
    vpnConnectionId: "string",
    vpnConnectionRouteId: "string",
});
Copy
type: outscale:VpnConnectionRoute
properties:
    destinationIpRange: string
    vpnConnectionId: string
    vpnConnectionRouteId: string
Copy

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

DestinationIpRange This property is required. string
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
VpnConnectionId This property is required. string
The ID of the target VPN connection of the static route.
VpnConnectionRouteId string
DestinationIpRange This property is required. string
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
VpnConnectionId This property is required. string
The ID of the target VPN connection of the static route.
VpnConnectionRouteId string
destinationIpRange This property is required. String
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
vpnConnectionId This property is required. String
The ID of the target VPN connection of the static route.
vpnConnectionRouteId String
destinationIpRange This property is required. string
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
vpnConnectionId This property is required. string
The ID of the target VPN connection of the static route.
vpnConnectionRouteId string
destination_ip_range This property is required. str
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
vpn_connection_id This property is required. str
The ID of the target VPN connection of the static route.
vpn_connection_route_id str
destinationIpRange This property is required. String
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
vpnConnectionId This property is required. String
The ID of the target VPN connection of the static route.
vpnConnectionRouteId String

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
RequestId string
Id string
The provider-assigned unique ID for this managed resource.
RequestId string
id String
The provider-assigned unique ID for this managed resource.
requestId String
id string
The provider-assigned unique ID for this managed resource.
requestId string
id str
The provider-assigned unique ID for this managed resource.
request_id str
id String
The provider-assigned unique ID for this managed resource.
requestId String

Look up Existing VpnConnectionRoute Resource

Get an existing VpnConnectionRoute 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?: VpnConnectionRouteState, opts?: CustomResourceOptions): VpnConnectionRoute
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        destination_ip_range: Optional[str] = None,
        request_id: Optional[str] = None,
        vpn_connection_id: Optional[str] = None,
        vpn_connection_route_id: Optional[str] = None) -> VpnConnectionRoute
func GetVpnConnectionRoute(ctx *Context, name string, id IDInput, state *VpnConnectionRouteState, opts ...ResourceOption) (*VpnConnectionRoute, error)
public static VpnConnectionRoute Get(string name, Input<string> id, VpnConnectionRouteState? state, CustomResourceOptions? opts = null)
public static VpnConnectionRoute get(String name, Output<String> id, VpnConnectionRouteState state, CustomResourceOptions options)
resources:  _:    type: outscale:VpnConnectionRoute    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
DestinationIpRange string
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
RequestId string
VpnConnectionId string
The ID of the target VPN connection of the static route.
VpnConnectionRouteId string
DestinationIpRange string
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
RequestId string
VpnConnectionId string
The ID of the target VPN connection of the static route.
VpnConnectionRouteId string
destinationIpRange String
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
requestId String
vpnConnectionId String
The ID of the target VPN connection of the static route.
vpnConnectionRouteId String
destinationIpRange string
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
requestId string
vpnConnectionId string
The ID of the target VPN connection of the static route.
vpnConnectionRouteId string
destination_ip_range str
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
request_id str
vpn_connection_id str
The ID of the target VPN connection of the static route.
vpn_connection_route_id str
destinationIpRange String
The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
requestId String
vpnConnectionId String
The ID of the target VPN connection of the static route.
vpnConnectionRouteId String

Import

A VPN connection route can be imported using the VPN connection ID and the route destination IP range. For example:

console

$ pulumi import outscale:index/vpnConnectionRoute:VpnConnectionRoute ImportedRoute vpn-12345678_10.0.0.0/0
Copy

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

Package Details

Repository
outscale outscale/terraform-provider-outscale
License
Notes
This Pulumi package is based on the outscale Terraform Provider.