alicloud.vpn.PbrRouteEntry
Explore with Pulumi AI
Provides a VPN Pbr Route Entry resource.
NOTE: Available since v1.162.0+.
For information about VPN Pbr Route Entry and how to use it, see What is VPN Pbr Route Entry.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const default = alicloud.vpn.getGateways({});
const defaultCustomerGateway = new alicloud.vpn.CustomerGateway("defaultCustomerGateway", {
description: "defaultCustomerGateway",
ipAddress: "2.2.2.5",
asn: "2224",
customerGatewayName: name,
});
const changeCustomerGateway = new alicloud.vpn.CustomerGateway("changeCustomerGateway", {
description: "changeCustomerGateway",
ipAddress: "2.2.2.6",
asn: "2225",
customerGatewayName: name,
});
const defaultConnection = new alicloud.vpn.Connection("default", {
vpnGatewayId: _default.then(_default => _default.ids?.[0]),
vpnConnectionName: name,
localSubnets: ["3.0.0.0/24"],
remoteSubnets: [
"10.0.0.0/24",
"10.0.1.0/24",
],
tags: {
Created: "TF",
For: "example",
},
enableTunnelsBgp: true,
tunnelOptionsSpecifications: [
{
tunnelIpsecConfig: {
ipsecAuthAlg: "md5",
ipsecEncAlg: "aes256",
ipsecLifetime: 16400,
ipsecPfs: "group5",
},
customerGatewayId: defaultCustomerGateway.id,
role: "master",
tunnelBgpConfig: {
localAsn: "1219002",
tunnelCidr: "169.254.30.0/30",
localBgpIp: "169.254.30.1",
},
tunnelIkeConfig: {
ikeMode: "aggressive",
ikeVersion: "ikev2",
localId: "localid_tunnel2",
psk: "12345678",
remoteId: "remote2",
ikeAuthAlg: "md5",
ikeEncAlg: "aes256",
ikeLifetime: 3600,
ikePfs: "group14",
},
},
{
tunnelIkeConfig: {
remoteId: "remote24",
ikeEncAlg: "aes256",
ikeLifetime: 27000,
ikeMode: "aggressive",
ikePfs: "group5",
ikeAuthAlg: "md5",
ikeVersion: "ikev2",
localId: "localid_tunnel2",
psk: "12345678",
},
tunnelIpsecConfig: {
ipsecLifetime: 2700,
ipsecPfs: "group14",
ipsecAuthAlg: "md5",
ipsecEncAlg: "aes256",
},
customerGatewayId: defaultCustomerGateway.id,
role: "slave",
tunnelBgpConfig: {
localAsn: "1219002",
localBgpIp: "169.254.40.1",
tunnelCidr: "169.254.40.0/30",
},
},
],
});
const defaultPbrRouteEntry = new alicloud.vpn.PbrRouteEntry("default", {
vpnGatewayId: _default.then(_default => _default.ids?.[0]),
routeSource: "192.168.1.0/24",
routeDest: "10.0.0.0/24",
nextHop: defaultConnection.id,
weight: 0,
publishVpc: false,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.vpn.get_gateways()
default_customer_gateway = alicloud.vpn.CustomerGateway("defaultCustomerGateway",
description="defaultCustomerGateway",
ip_address="2.2.2.5",
asn="2224",
customer_gateway_name=name)
change_customer_gateway = alicloud.vpn.CustomerGateway("changeCustomerGateway",
description="changeCustomerGateway",
ip_address="2.2.2.6",
asn="2225",
customer_gateway_name=name)
default_connection = alicloud.vpn.Connection("default",
vpn_gateway_id=default.ids[0],
vpn_connection_name=name,
local_subnets=["3.0.0.0/24"],
remote_subnets=[
"10.0.0.0/24",
"10.0.1.0/24",
],
tags={
"Created": "TF",
"For": "example",
},
enable_tunnels_bgp=True,
tunnel_options_specifications=[
{
"tunnel_ipsec_config": {
"ipsec_auth_alg": "md5",
"ipsec_enc_alg": "aes256",
"ipsec_lifetime": 16400,
"ipsec_pfs": "group5",
},
"customer_gateway_id": default_customer_gateway.id,
"role": "master",
"tunnel_bgp_config": {
"local_asn": "1219002",
"tunnel_cidr": "169.254.30.0/30",
"local_bgp_ip": "169.254.30.1",
},
"tunnel_ike_config": {
"ike_mode": "aggressive",
"ike_version": "ikev2",
"local_id": "localid_tunnel2",
"psk": "12345678",
"remote_id": "remote2",
"ike_auth_alg": "md5",
"ike_enc_alg": "aes256",
"ike_lifetime": 3600,
"ike_pfs": "group14",
},
},
{
"tunnel_ike_config": {
"remote_id": "remote24",
"ike_enc_alg": "aes256",
"ike_lifetime": 27000,
"ike_mode": "aggressive",
"ike_pfs": "group5",
"ike_auth_alg": "md5",
"ike_version": "ikev2",
"local_id": "localid_tunnel2",
"psk": "12345678",
},
"tunnel_ipsec_config": {
"ipsec_lifetime": 2700,
"ipsec_pfs": "group14",
"ipsec_auth_alg": "md5",
"ipsec_enc_alg": "aes256",
},
"customer_gateway_id": default_customer_gateway.id,
"role": "slave",
"tunnel_bgp_config": {
"local_asn": "1219002",
"local_bgp_ip": "169.254.40.1",
"tunnel_cidr": "169.254.40.0/30",
},
},
])
default_pbr_route_entry = alicloud.vpn.PbrRouteEntry("default",
vpn_gateway_id=default.ids[0],
route_source="192.168.1.0/24",
route_dest="10.0.0.0/24",
next_hop=default_connection.id,
weight=0,
publish_vpc=False)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpn"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := vpn.GetGateways(ctx, &vpn.GetGatewaysArgs{}, nil)
if err != nil {
return err
}
defaultCustomerGateway, err := vpn.NewCustomerGateway(ctx, "defaultCustomerGateway", &vpn.CustomerGatewayArgs{
Description: pulumi.String("defaultCustomerGateway"),
IpAddress: pulumi.String("2.2.2.5"),
Asn: pulumi.String("2224"),
CustomerGatewayName: pulumi.String(name),
})
if err != nil {
return err
}
_, err = vpn.NewCustomerGateway(ctx, "changeCustomerGateway", &vpn.CustomerGatewayArgs{
Description: pulumi.String("changeCustomerGateway"),
IpAddress: pulumi.String("2.2.2.6"),
Asn: pulumi.String("2225"),
CustomerGatewayName: pulumi.String(name),
})
if err != nil {
return err
}
defaultConnection, err := vpn.NewConnection(ctx, "default", &vpn.ConnectionArgs{
VpnGatewayId: pulumi.String(_default.Ids[0]),
VpnConnectionName: pulumi.String(name),
LocalSubnets: pulumi.StringArray{
pulumi.String("3.0.0.0/24"),
},
RemoteSubnets: pulumi.StringArray{
pulumi.String("10.0.0.0/24"),
pulumi.String("10.0.1.0/24"),
},
Tags: pulumi.StringMap{
"Created": pulumi.String("TF"),
"For": pulumi.String("example"),
},
EnableTunnelsBgp: pulumi.Bool(true),
TunnelOptionsSpecifications: vpn.ConnectionTunnelOptionsSpecificationArray{
&vpn.ConnectionTunnelOptionsSpecificationArgs{
TunnelIpsecConfig: &vpn.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs{
IpsecAuthAlg: pulumi.String("md5"),
IpsecEncAlg: pulumi.String("aes256"),
IpsecLifetime: pulumi.Int(16400),
IpsecPfs: pulumi.String("group5"),
},
CustomerGatewayId: defaultCustomerGateway.ID(),
Role: pulumi.String("master"),
TunnelBgpConfig: &vpn.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs{
LocalAsn: pulumi.String("1219002"),
TunnelCidr: pulumi.String("169.254.30.0/30"),
LocalBgpIp: pulumi.String("169.254.30.1"),
},
TunnelIkeConfig: &vpn.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs{
IkeMode: pulumi.String("aggressive"),
IkeVersion: pulumi.String("ikev2"),
LocalId: pulumi.String("localid_tunnel2"),
Psk: pulumi.String("12345678"),
RemoteId: pulumi.String("remote2"),
IkeAuthAlg: pulumi.String("md5"),
IkeEncAlg: pulumi.String("aes256"),
IkeLifetime: pulumi.Int(3600),
IkePfs: pulumi.String("group14"),
},
},
&vpn.ConnectionTunnelOptionsSpecificationArgs{
TunnelIkeConfig: &vpn.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs{
RemoteId: pulumi.String("remote24"),
IkeEncAlg: pulumi.String("aes256"),
IkeLifetime: pulumi.Int(27000),
IkeMode: pulumi.String("aggressive"),
IkePfs: pulumi.String("group5"),
IkeAuthAlg: pulumi.String("md5"),
IkeVersion: pulumi.String("ikev2"),
LocalId: pulumi.String("localid_tunnel2"),
Psk: pulumi.String("12345678"),
},
TunnelIpsecConfig: &vpn.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs{
IpsecLifetime: pulumi.Int(2700),
IpsecPfs: pulumi.String("group14"),
IpsecAuthAlg: pulumi.String("md5"),
IpsecEncAlg: pulumi.String("aes256"),
},
CustomerGatewayId: defaultCustomerGateway.ID(),
Role: pulumi.String("slave"),
TunnelBgpConfig: &vpn.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs{
LocalAsn: pulumi.String("1219002"),
LocalBgpIp: pulumi.String("169.254.40.1"),
TunnelCidr: pulumi.String("169.254.40.0/30"),
},
},
},
})
if err != nil {
return err
}
_, err = vpn.NewPbrRouteEntry(ctx, "default", &vpn.PbrRouteEntryArgs{
VpnGatewayId: pulumi.String(_default.Ids[0]),
RouteSource: pulumi.String("192.168.1.0/24"),
RouteDest: pulumi.String("10.0.0.0/24"),
NextHop: defaultConnection.ID(),
Weight: pulumi.Int(0),
PublishVpc: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.Vpn.GetGateways.Invoke();
var defaultCustomerGateway = new AliCloud.Vpn.CustomerGateway("defaultCustomerGateway", new()
{
Description = "defaultCustomerGateway",
IpAddress = "2.2.2.5",
Asn = "2224",
CustomerGatewayName = name,
});
var changeCustomerGateway = new AliCloud.Vpn.CustomerGateway("changeCustomerGateway", new()
{
Description = "changeCustomerGateway",
IpAddress = "2.2.2.6",
Asn = "2225",
CustomerGatewayName = name,
});
var defaultConnection = new AliCloud.Vpn.Connection("default", new()
{
VpnGatewayId = @default.Apply(@default => @default.Apply(getGatewaysResult => getGatewaysResult.Ids[0])),
VpnConnectionName = name,
LocalSubnets = new[]
{
"3.0.0.0/24",
},
RemoteSubnets = new[]
{
"10.0.0.0/24",
"10.0.1.0/24",
},
Tags =
{
{ "Created", "TF" },
{ "For", "example" },
},
EnableTunnelsBgp = true,
TunnelOptionsSpecifications = new[]
{
new AliCloud.Vpn.Inputs.ConnectionTunnelOptionsSpecificationArgs
{
TunnelIpsecConfig = new AliCloud.Vpn.Inputs.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs
{
IpsecAuthAlg = "md5",
IpsecEncAlg = "aes256",
IpsecLifetime = 16400,
IpsecPfs = "group5",
},
CustomerGatewayId = defaultCustomerGateway.Id,
Role = "master",
TunnelBgpConfig = new AliCloud.Vpn.Inputs.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs
{
LocalAsn = "1219002",
TunnelCidr = "169.254.30.0/30",
LocalBgpIp = "169.254.30.1",
},
TunnelIkeConfig = new AliCloud.Vpn.Inputs.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs
{
IkeMode = "aggressive",
IkeVersion = "ikev2",
LocalId = "localid_tunnel2",
Psk = "12345678",
RemoteId = "remote2",
IkeAuthAlg = "md5",
IkeEncAlg = "aes256",
IkeLifetime = 3600,
IkePfs = "group14",
},
},
new AliCloud.Vpn.Inputs.ConnectionTunnelOptionsSpecificationArgs
{
TunnelIkeConfig = new AliCloud.Vpn.Inputs.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs
{
RemoteId = "remote24",
IkeEncAlg = "aes256",
IkeLifetime = 27000,
IkeMode = "aggressive",
IkePfs = "group5",
IkeAuthAlg = "md5",
IkeVersion = "ikev2",
LocalId = "localid_tunnel2",
Psk = "12345678",
},
TunnelIpsecConfig = new AliCloud.Vpn.Inputs.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs
{
IpsecLifetime = 2700,
IpsecPfs = "group14",
IpsecAuthAlg = "md5",
IpsecEncAlg = "aes256",
},
CustomerGatewayId = defaultCustomerGateway.Id,
Role = "slave",
TunnelBgpConfig = new AliCloud.Vpn.Inputs.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs
{
LocalAsn = "1219002",
LocalBgpIp = "169.254.40.1",
TunnelCidr = "169.254.40.0/30",
},
},
},
});
var defaultPbrRouteEntry = new AliCloud.Vpn.PbrRouteEntry("default", new()
{
VpnGatewayId = @default.Apply(@default => @default.Apply(getGatewaysResult => getGatewaysResult.Ids[0])),
RouteSource = "192.168.1.0/24",
RouteDest = "10.0.0.0/24",
NextHop = defaultConnection.Id,
Weight = 0,
PublishVpc = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpn.VpnFunctions;
import com.pulumi.alicloud.vpn.inputs.GetGatewaysArgs;
import com.pulumi.alicloud.vpn.CustomerGateway;
import com.pulumi.alicloud.vpn.CustomerGatewayArgs;
import com.pulumi.alicloud.vpn.Connection;
import com.pulumi.alicloud.vpn.ConnectionArgs;
import com.pulumi.alicloud.vpn.inputs.ConnectionTunnelOptionsSpecificationArgs;
import com.pulumi.alicloud.vpn.inputs.ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs;
import com.pulumi.alicloud.vpn.inputs.ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs;
import com.pulumi.alicloud.vpn.inputs.ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs;
import com.pulumi.alicloud.vpn.PbrRouteEntry;
import com.pulumi.alicloud.vpn.PbrRouteEntryArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var default = VpnFunctions.getGateways();
var defaultCustomerGateway = new CustomerGateway("defaultCustomerGateway", CustomerGatewayArgs.builder()
.description("defaultCustomerGateway")
.ipAddress("2.2.2.5")
.asn("2224")
.customerGatewayName(name)
.build());
var changeCustomerGateway = new CustomerGateway("changeCustomerGateway", CustomerGatewayArgs.builder()
.description("changeCustomerGateway")
.ipAddress("2.2.2.6")
.asn("2225")
.customerGatewayName(name)
.build());
var defaultConnection = new Connection("defaultConnection", ConnectionArgs.builder()
.vpnGatewayId(default_.ids()[0])
.vpnConnectionName(name)
.localSubnets("3.0.0.0/24")
.remoteSubnets(
"10.0.0.0/24",
"10.0.1.0/24")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "example")
))
.enableTunnelsBgp("true")
.tunnelOptionsSpecifications(
ConnectionTunnelOptionsSpecificationArgs.builder()
.tunnelIpsecConfig(ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs.builder()
.ipsecAuthAlg("md5")
.ipsecEncAlg("aes256")
.ipsecLifetime("16400")
.ipsecPfs("group5")
.build())
.customerGatewayId(defaultCustomerGateway.id())
.role("master")
.tunnelBgpConfig(ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs.builder()
.localAsn("1219002")
.tunnelCidr("169.254.30.0/30")
.localBgpIp("169.254.30.1")
.build())
.tunnelIkeConfig(ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs.builder()
.ikeMode("aggressive")
.ikeVersion("ikev2")
.localId("localid_tunnel2")
.psk("12345678")
.remoteId("remote2")
.ikeAuthAlg("md5")
.ikeEncAlg("aes256")
.ikeLifetime("3600")
.ikePfs("group14")
.build())
.build(),
ConnectionTunnelOptionsSpecificationArgs.builder()
.tunnelIkeConfig(ConnectionTunnelOptionsSpecificationTunnelIkeConfigArgs.builder()
.remoteId("remote24")
.ikeEncAlg("aes256")
.ikeLifetime("27000")
.ikeMode("aggressive")
.ikePfs("group5")
.ikeAuthAlg("md5")
.ikeVersion("ikev2")
.localId("localid_tunnel2")
.psk("12345678")
.build())
.tunnelIpsecConfig(ConnectionTunnelOptionsSpecificationTunnelIpsecConfigArgs.builder()
.ipsecLifetime("2700")
.ipsecPfs("group14")
.ipsecAuthAlg("md5")
.ipsecEncAlg("aes256")
.build())
.customerGatewayId(defaultCustomerGateway.id())
.role("slave")
.tunnelBgpConfig(ConnectionTunnelOptionsSpecificationTunnelBgpConfigArgs.builder()
.localAsn("1219002")
.localBgpIp("169.254.40.1")
.tunnelCidr("169.254.40.0/30")
.build())
.build())
.build());
var defaultPbrRouteEntry = new PbrRouteEntry("defaultPbrRouteEntry", PbrRouteEntryArgs.builder()
.vpnGatewayId(default_.ids()[0])
.routeSource("192.168.1.0/24")
.routeDest("10.0.0.0/24")
.nextHop(defaultConnection.id())
.weight(0)
.publishVpc(false)
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultCustomerGateway:
type: alicloud:vpn:CustomerGateway
properties:
description: defaultCustomerGateway
ipAddress: 2.2.2.5
asn: '2224'
customerGatewayName: ${name}
changeCustomerGateway:
type: alicloud:vpn:CustomerGateway
properties:
description: changeCustomerGateway
ipAddress: 2.2.2.6
asn: '2225'
customerGatewayName: ${name}
defaultConnection:
type: alicloud:vpn:Connection
name: default
properties:
vpnGatewayId: ${default.ids[0]}
vpnConnectionName: ${name}
localSubnets:
- 3.0.0.0/24
remoteSubnets:
- 10.0.0.0/24
- 10.0.1.0/24
tags:
Created: TF
For: example
enableTunnelsBgp: 'true'
tunnelOptionsSpecifications:
- tunnelIpsecConfig:
ipsecAuthAlg: md5
ipsecEncAlg: aes256
ipsecLifetime: '16400'
ipsecPfs: group5
customerGatewayId: ${defaultCustomerGateway.id}
role: master
tunnelBgpConfig:
localAsn: '1219002'
tunnelCidr: 169.254.30.0/30
localBgpIp: 169.254.30.1
tunnelIkeConfig:
ikeMode: aggressive
ikeVersion: ikev2
localId: localid_tunnel2
psk: '12345678'
remoteId: remote2
ikeAuthAlg: md5
ikeEncAlg: aes256
ikeLifetime: '3600'
ikePfs: group14
- tunnelIkeConfig:
remoteId: remote24
ikeEncAlg: aes256
ikeLifetime: '27000'
ikeMode: aggressive
ikePfs: group5
ikeAuthAlg: md5
ikeVersion: ikev2
localId: localid_tunnel2
psk: '12345678'
tunnelIpsecConfig:
ipsecLifetime: '2700'
ipsecPfs: group14
ipsecAuthAlg: md5
ipsecEncAlg: aes256
customerGatewayId: ${defaultCustomerGateway.id}
role: slave
tunnelBgpConfig:
localAsn: '1219002'
localBgpIp: 169.254.40.1
tunnelCidr: 169.254.40.0/30
defaultPbrRouteEntry:
type: alicloud:vpn:PbrRouteEntry
name: default
properties:
vpnGatewayId: ${default.ids[0]}
routeSource: 192.168.1.0/24
routeDest: 10.0.0.0/24
nextHop: ${defaultConnection.id}
weight: 0
publishVpc: false
variables:
default:
fn::invoke:
Function: alicloud:vpn:getGateways
Arguments: {}
Create PbrRouteEntry Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PbrRouteEntry(name: string, args: PbrRouteEntryArgs, opts?: CustomResourceOptions);
@overload
def PbrRouteEntry(resource_name: str,
args: PbrRouteEntryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PbrRouteEntry(resource_name: str,
opts: Optional[ResourceOptions] = None,
next_hop: Optional[str] = None,
publish_vpc: Optional[bool] = None,
route_dest: Optional[str] = None,
route_source: Optional[str] = None,
vpn_gateway_id: Optional[str] = None,
weight: Optional[int] = None)
func NewPbrRouteEntry(ctx *Context, name string, args PbrRouteEntryArgs, opts ...ResourceOption) (*PbrRouteEntry, error)
public PbrRouteEntry(string name, PbrRouteEntryArgs args, CustomResourceOptions? opts = null)
public PbrRouteEntry(String name, PbrRouteEntryArgs args)
public PbrRouteEntry(String name, PbrRouteEntryArgs args, CustomResourceOptions options)
type: alicloud:vpn:PbrRouteEntry
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 PbrRouteEntryArgs
- 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 PbrRouteEntryArgs
- 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 PbrRouteEntryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PbrRouteEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PbrRouteEntryArgs
- 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 pbrRouteEntryResource = new AliCloud.Vpn.PbrRouteEntry("pbrRouteEntryResource", new()
{
NextHop = "string",
PublishVpc = false,
RouteDest = "string",
RouteSource = "string",
VpnGatewayId = "string",
Weight = 0,
});
example, err := vpn.NewPbrRouteEntry(ctx, "pbrRouteEntryResource", &vpn.PbrRouteEntryArgs{
NextHop: pulumi.String("string"),
PublishVpc: pulumi.Bool(false),
RouteDest: pulumi.String("string"),
RouteSource: pulumi.String("string"),
VpnGatewayId: pulumi.String("string"),
Weight: pulumi.Int(0),
})
var pbrRouteEntryResource = new PbrRouteEntry("pbrRouteEntryResource", PbrRouteEntryArgs.builder()
.nextHop("string")
.publishVpc(false)
.routeDest("string")
.routeSource("string")
.vpnGatewayId("string")
.weight(0)
.build());
pbr_route_entry_resource = alicloud.vpn.PbrRouteEntry("pbrRouteEntryResource",
next_hop="string",
publish_vpc=False,
route_dest="string",
route_source="string",
vpn_gateway_id="string",
weight=0)
const pbrRouteEntryResource = new alicloud.vpn.PbrRouteEntry("pbrRouteEntryResource", {
nextHop: "string",
publishVpc: false,
routeDest: "string",
routeSource: "string",
vpnGatewayId: "string",
weight: 0,
});
type: alicloud:vpn:PbrRouteEntry
properties:
nextHop: string
publishVpc: false
routeDest: string
routeSource: string
vpnGatewayId: string
weight: 0
PbrRouteEntry 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 PbrRouteEntry resource accepts the following input properties:
- Next
Hop string - The next hop of the policy-based route.
- Publish
Vpc bool - Whether to issue the destination route to the VPC.
- Route
Dest string - The destination CIDR block of the policy-based route.
- Route
Source string - The source CIDR block of the policy-based route.
- Vpn
Gateway stringId - The ID of the vpn gateway.
- Weight int
- The weight of the policy-based route. Valid values: 0 and 100.
- Next
Hop string - The next hop of the policy-based route.
- Publish
Vpc bool - Whether to issue the destination route to the VPC.
- Route
Dest string - The destination CIDR block of the policy-based route.
- Route
Source string - The source CIDR block of the policy-based route.
- Vpn
Gateway stringId - The ID of the vpn gateway.
- Weight int
- The weight of the policy-based route. Valid values: 0 and 100.
- next
Hop String - The next hop of the policy-based route.
- publish
Vpc Boolean - Whether to issue the destination route to the VPC.
- route
Dest String - The destination CIDR block of the policy-based route.
- route
Source String - The source CIDR block of the policy-based route.
- vpn
Gateway StringId - The ID of the vpn gateway.
- weight Integer
- The weight of the policy-based route. Valid values: 0 and 100.
- next
Hop string - The next hop of the policy-based route.
- publish
Vpc boolean - Whether to issue the destination route to the VPC.
- route
Dest string - The destination CIDR block of the policy-based route.
- route
Source string - The source CIDR block of the policy-based route.
- vpn
Gateway stringId - The ID of the vpn gateway.
- weight number
- The weight of the policy-based route. Valid values: 0 and 100.
- next_
hop str - The next hop of the policy-based route.
- publish_
vpc bool - Whether to issue the destination route to the VPC.
- route_
dest str - The destination CIDR block of the policy-based route.
- route_
source str - The source CIDR block of the policy-based route.
- vpn_
gateway_ strid - The ID of the vpn gateway.
- weight int
- The weight of the policy-based route. Valid values: 0 and 100.
- next
Hop String - The next hop of the policy-based route.
- publish
Vpc Boolean - Whether to issue the destination route to the VPC.
- route
Dest String - The destination CIDR block of the policy-based route.
- route
Source String - The source CIDR block of the policy-based route.
- vpn
Gateway StringId - The ID of the vpn gateway.
- weight Number
- The weight of the policy-based route. Valid values: 0 and 100.
Outputs
All input properties are implicitly available as output properties. Additionally, the PbrRouteEntry resource produces the following output properties:
Look up Existing PbrRouteEntry Resource
Get an existing PbrRouteEntry 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?: PbrRouteEntryState, opts?: CustomResourceOptions): PbrRouteEntry
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
next_hop: Optional[str] = None,
publish_vpc: Optional[bool] = None,
route_dest: Optional[str] = None,
route_source: Optional[str] = None,
status: Optional[str] = None,
vpn_gateway_id: Optional[str] = None,
weight: Optional[int] = None) -> PbrRouteEntry
func GetPbrRouteEntry(ctx *Context, name string, id IDInput, state *PbrRouteEntryState, opts ...ResourceOption) (*PbrRouteEntry, error)
public static PbrRouteEntry Get(string name, Input<string> id, PbrRouteEntryState? state, CustomResourceOptions? opts = null)
public static PbrRouteEntry get(String name, Output<String> id, PbrRouteEntryState 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.
- Next
Hop string - The next hop of the policy-based route.
- Publish
Vpc bool - Whether to issue the destination route to the VPC.
- Route
Dest string - The destination CIDR block of the policy-based route.
- Route
Source string - The source CIDR block of the policy-based route.
- Status string
- The status of the vpn pbr route entry.
- Vpn
Gateway stringId - The ID of the vpn gateway.
- Weight int
- The weight of the policy-based route. Valid values: 0 and 100.
- Next
Hop string - The next hop of the policy-based route.
- Publish
Vpc bool - Whether to issue the destination route to the VPC.
- Route
Dest string - The destination CIDR block of the policy-based route.
- Route
Source string - The source CIDR block of the policy-based route.
- Status string
- The status of the vpn pbr route entry.
- Vpn
Gateway stringId - The ID of the vpn gateway.
- Weight int
- The weight of the policy-based route. Valid values: 0 and 100.
- next
Hop String - The next hop of the policy-based route.
- publish
Vpc Boolean - Whether to issue the destination route to the VPC.
- route
Dest String - The destination CIDR block of the policy-based route.
- route
Source String - The source CIDR block of the policy-based route.
- status String
- The status of the vpn pbr route entry.
- vpn
Gateway StringId - The ID of the vpn gateway.
- weight Integer
- The weight of the policy-based route. Valid values: 0 and 100.
- next
Hop string - The next hop of the policy-based route.
- publish
Vpc boolean - Whether to issue the destination route to the VPC.
- route
Dest string - The destination CIDR block of the policy-based route.
- route
Source string - The source CIDR block of the policy-based route.
- status string
- The status of the vpn pbr route entry.
- vpn
Gateway stringId - The ID of the vpn gateway.
- weight number
- The weight of the policy-based route. Valid values: 0 and 100.
- next_
hop str - The next hop of the policy-based route.
- publish_
vpc bool - Whether to issue the destination route to the VPC.
- route_
dest str - The destination CIDR block of the policy-based route.
- route_
source str - The source CIDR block of the policy-based route.
- status str
- The status of the vpn pbr route entry.
- vpn_
gateway_ strid - The ID of the vpn gateway.
- weight int
- The weight of the policy-based route. Valid values: 0 and 100.
- next
Hop String - The next hop of the policy-based route.
- publish
Vpc Boolean - Whether to issue the destination route to the VPC.
- route
Dest String - The destination CIDR block of the policy-based route.
- route
Source String - The source CIDR block of the policy-based route.
- status String
- The status of the vpn pbr route entry.
- vpn
Gateway StringId - The ID of the vpn gateway.
- weight Number
- The weight of the policy-based route. Valid values: 0 and 100.
Import
VPN Pbr route entry can be imported using the id, e.g.
$ pulumi import alicloud:vpn/pbrRouteEntry:PbrRouteEntry example <vpn_gateway_id>:<next_hop>:<route_source>:<route_dest>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.