alicloud.cen.TransitRouterVpnAttachment
Explore with Pulumi AI
Provides a Cloud Enterprise Network (CEN) Transit Router Vpn Attachment resource.
For information about Cloud Enterprise Network (CEN) Transit Router Vpn Attachment and how to use it, see What is Transit Router Vpn Attachment.
NOTE: Available since v1.183.0.
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") || "tf_example";
const default = alicloud.cen.getTransitRouterAvailableResources({});
const example = new alicloud.cen.Instance("example", {cenInstanceName: name});
const exampleTransitRouter = new alicloud.cen.TransitRouter("example", {
cenId: example.id,
transitRouterDescription: name,
transitRouterName: name,
});
const exampleCustomerGateway = new alicloud.vpn.CustomerGateway("example", {
customerGatewayName: name,
ipAddress: "42.104.22.210",
asn: "45014",
description: name,
});
const exampleGatewayVpnAttachment = new alicloud.vpn.GatewayVpnAttachment("example", {
customerGatewayId: exampleCustomerGateway.id,
networkType: "public",
localSubnet: "0.0.0.0/0",
remoteSubnet: "0.0.0.0/0",
effectImmediately: false,
ikeConfig: {
ikeAuthAlg: "md5",
ikeEncAlg: "des",
ikeVersion: "ikev2",
ikeMode: "main",
ikeLifetime: 86400,
psk: "tf-testvpn2",
ikePfs: "group1",
remoteId: "testbob2",
localId: "testalice2",
},
ipsecConfig: {
ipsecPfs: "group5",
ipsecEncAlg: "des",
ipsecAuthAlg: "md5",
ipsecLifetime: 86400,
},
bgpConfig: {
enable: true,
localAsn: 45014,
tunnelCidr: "169.254.11.0/30",
localBgpIp: "169.254.11.1",
},
healthCheckConfig: {
enable: true,
sip: "192.168.1.1",
dip: "10.0.0.1",
interval: 10,
retry: 10,
policy: "revoke_route",
},
enableDpd: true,
enableNatTraversal: true,
vpnAttachmentName: name,
});
const exampleTransitRouterCidr = new alicloud.cen.TransitRouterCidr("example", {
transitRouterId: exampleTransitRouter.transitRouterId,
cidr: "192.168.0.0/16",
transitRouterCidrName: name,
description: name,
publishCidrRoute: true,
});
const exampleTransitRouterVpnAttachment = new alicloud.cen.TransitRouterVpnAttachment("example", {
autoPublishRouteEnabled: false,
transitRouterAttachmentDescription: name,
transitRouterAttachmentName: name,
cenId: exampleTransitRouter.cenId,
transitRouterId: exampleTransitRouterCidr.transitRouterId,
vpnId: exampleGatewayVpnAttachment.id,
zones: [{
zoneId: _default.then(_default => _default.resources?.[0]?.masterZones?.[0]),
}],
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf_example"
default = alicloud.cen.get_transit_router_available_resources()
example = alicloud.cen.Instance("example", cen_instance_name=name)
example_transit_router = alicloud.cen.TransitRouter("example",
cen_id=example.id,
transit_router_description=name,
transit_router_name=name)
example_customer_gateway = alicloud.vpn.CustomerGateway("example",
customer_gateway_name=name,
ip_address="42.104.22.210",
asn="45014",
description=name)
example_gateway_vpn_attachment = alicloud.vpn.GatewayVpnAttachment("example",
customer_gateway_id=example_customer_gateway.id,
network_type="public",
local_subnet="0.0.0.0/0",
remote_subnet="0.0.0.0/0",
effect_immediately=False,
ike_config={
"ike_auth_alg": "md5",
"ike_enc_alg": "des",
"ike_version": "ikev2",
"ike_mode": "main",
"ike_lifetime": 86400,
"psk": "tf-testvpn2",
"ike_pfs": "group1",
"remote_id": "testbob2",
"local_id": "testalice2",
},
ipsec_config={
"ipsec_pfs": "group5",
"ipsec_enc_alg": "des",
"ipsec_auth_alg": "md5",
"ipsec_lifetime": 86400,
},
bgp_config={
"enable": True,
"local_asn": 45014,
"tunnel_cidr": "169.254.11.0/30",
"local_bgp_ip": "169.254.11.1",
},
health_check_config={
"enable": True,
"sip": "192.168.1.1",
"dip": "10.0.0.1",
"interval": 10,
"retry": 10,
"policy": "revoke_route",
},
enable_dpd=True,
enable_nat_traversal=True,
vpn_attachment_name=name)
example_transit_router_cidr = alicloud.cen.TransitRouterCidr("example",
transit_router_id=example_transit_router.transit_router_id,
cidr="192.168.0.0/16",
transit_router_cidr_name=name,
description=name,
publish_cidr_route=True)
example_transit_router_vpn_attachment = alicloud.cen.TransitRouterVpnAttachment("example",
auto_publish_route_enabled=False,
transit_router_attachment_description=name,
transit_router_attachment_name=name,
cen_id=example_transit_router.cen_id,
transit_router_id=example_transit_router_cidr.transit_router_id,
vpn_id=example_gateway_vpn_attachment.id,
zones=[{
"zone_id": default.resources[0].master_zones[0],
}])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
"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 := "tf_example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := cen.GetTransitRouterAvailableResources(ctx, &cen.GetTransitRouterAvailableResourcesArgs{}, nil)
if err != nil {
return err
}
example, err := cen.NewInstance(ctx, "example", &cen.InstanceArgs{
CenInstanceName: pulumi.String(name),
})
if err != nil {
return err
}
exampleTransitRouter, err := cen.NewTransitRouter(ctx, "example", &cen.TransitRouterArgs{
CenId: example.ID(),
TransitRouterDescription: pulumi.String(name),
TransitRouterName: pulumi.String(name),
})
if err != nil {
return err
}
exampleCustomerGateway, err := vpn.NewCustomerGateway(ctx, "example", &vpn.CustomerGatewayArgs{
CustomerGatewayName: pulumi.String(name),
IpAddress: pulumi.String("42.104.22.210"),
Asn: pulumi.String("45014"),
Description: pulumi.String(name),
})
if err != nil {
return err
}
exampleGatewayVpnAttachment, err := vpn.NewGatewayVpnAttachment(ctx, "example", &vpn.GatewayVpnAttachmentArgs{
CustomerGatewayId: exampleCustomerGateway.ID(),
NetworkType: pulumi.String("public"),
LocalSubnet: pulumi.String("0.0.0.0/0"),
RemoteSubnet: pulumi.String("0.0.0.0/0"),
EffectImmediately: pulumi.Bool(false),
IkeConfig: &vpn.GatewayVpnAttachmentIkeConfigArgs{
IkeAuthAlg: pulumi.String("md5"),
IkeEncAlg: pulumi.String("des"),
IkeVersion: pulumi.String("ikev2"),
IkeMode: pulumi.String("main"),
IkeLifetime: pulumi.Int(86400),
Psk: pulumi.String("tf-testvpn2"),
IkePfs: pulumi.String("group1"),
RemoteId: pulumi.String("testbob2"),
LocalId: pulumi.String("testalice2"),
},
IpsecConfig: &vpn.GatewayVpnAttachmentIpsecConfigArgs{
IpsecPfs: pulumi.String("group5"),
IpsecEncAlg: pulumi.String("des"),
IpsecAuthAlg: pulumi.String("md5"),
IpsecLifetime: pulumi.Int(86400),
},
BgpConfig: &vpn.GatewayVpnAttachmentBgpConfigArgs{
Enable: pulumi.Bool(true),
LocalAsn: pulumi.Int(45014),
TunnelCidr: pulumi.String("169.254.11.0/30"),
LocalBgpIp: pulumi.String("169.254.11.1"),
},
HealthCheckConfig: &vpn.GatewayVpnAttachmentHealthCheckConfigArgs{
Enable: pulumi.Bool(true),
Sip: pulumi.String("192.168.1.1"),
Dip: pulumi.String("10.0.0.1"),
Interval: pulumi.Int(10),
Retry: pulumi.Int(10),
Policy: pulumi.String("revoke_route"),
},
EnableDpd: pulumi.Bool(true),
EnableNatTraversal: pulumi.Bool(true),
VpnAttachmentName: pulumi.String(name),
})
if err != nil {
return err
}
exampleTransitRouterCidr, err := cen.NewTransitRouterCidr(ctx, "example", &cen.TransitRouterCidrArgs{
TransitRouterId: exampleTransitRouter.TransitRouterId,
Cidr: pulumi.String("192.168.0.0/16"),
TransitRouterCidrName: pulumi.String(name),
Description: pulumi.String(name),
PublishCidrRoute: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = cen.NewTransitRouterVpnAttachment(ctx, "example", &cen.TransitRouterVpnAttachmentArgs{
AutoPublishRouteEnabled: pulumi.Bool(false),
TransitRouterAttachmentDescription: pulumi.String(name),
TransitRouterAttachmentName: pulumi.String(name),
CenId: exampleTransitRouter.CenId,
TransitRouterId: exampleTransitRouterCidr.TransitRouterId,
VpnId: exampleGatewayVpnAttachment.ID(),
Zones: cen.TransitRouterVpnAttachmentZoneArray{
&cen.TransitRouterVpnAttachmentZoneArgs{
ZoneId: pulumi.String(_default.Resources[0].MasterZones[0]),
},
},
})
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") ?? "tf_example";
var @default = AliCloud.Cen.GetTransitRouterAvailableResources.Invoke();
var example = new AliCloud.Cen.Instance("example", new()
{
CenInstanceName = name,
});
var exampleTransitRouter = new AliCloud.Cen.TransitRouter("example", new()
{
CenId = example.Id,
TransitRouterDescription = name,
TransitRouterName = name,
});
var exampleCustomerGateway = new AliCloud.Vpn.CustomerGateway("example", new()
{
CustomerGatewayName = name,
IpAddress = "42.104.22.210",
Asn = "45014",
Description = name,
});
var exampleGatewayVpnAttachment = new AliCloud.Vpn.GatewayVpnAttachment("example", new()
{
CustomerGatewayId = exampleCustomerGateway.Id,
NetworkType = "public",
LocalSubnet = "0.0.0.0/0",
RemoteSubnet = "0.0.0.0/0",
EffectImmediately = false,
IkeConfig = new AliCloud.Vpn.Inputs.GatewayVpnAttachmentIkeConfigArgs
{
IkeAuthAlg = "md5",
IkeEncAlg = "des",
IkeVersion = "ikev2",
IkeMode = "main",
IkeLifetime = 86400,
Psk = "tf-testvpn2",
IkePfs = "group1",
RemoteId = "testbob2",
LocalId = "testalice2",
},
IpsecConfig = new AliCloud.Vpn.Inputs.GatewayVpnAttachmentIpsecConfigArgs
{
IpsecPfs = "group5",
IpsecEncAlg = "des",
IpsecAuthAlg = "md5",
IpsecLifetime = 86400,
},
BgpConfig = new AliCloud.Vpn.Inputs.GatewayVpnAttachmentBgpConfigArgs
{
Enable = true,
LocalAsn = 45014,
TunnelCidr = "169.254.11.0/30",
LocalBgpIp = "169.254.11.1",
},
HealthCheckConfig = new AliCloud.Vpn.Inputs.GatewayVpnAttachmentHealthCheckConfigArgs
{
Enable = true,
Sip = "192.168.1.1",
Dip = "10.0.0.1",
Interval = 10,
Retry = 10,
Policy = "revoke_route",
},
EnableDpd = true,
EnableNatTraversal = true,
VpnAttachmentName = name,
});
var exampleTransitRouterCidr = new AliCloud.Cen.TransitRouterCidr("example", new()
{
TransitRouterId = exampleTransitRouter.TransitRouterId,
Cidr = "192.168.0.0/16",
TransitRouterCidrName = name,
Description = name,
PublishCidrRoute = true,
});
var exampleTransitRouterVpnAttachment = new AliCloud.Cen.TransitRouterVpnAttachment("example", new()
{
AutoPublishRouteEnabled = false,
TransitRouterAttachmentDescription = name,
TransitRouterAttachmentName = name,
CenId = exampleTransitRouter.CenId,
TransitRouterId = exampleTransitRouterCidr.TransitRouterId,
VpnId = exampleGatewayVpnAttachment.Id,
Zones = new[]
{
new AliCloud.Cen.Inputs.TransitRouterVpnAttachmentZoneArgs
{
ZoneId = @default.Apply(@default => @default.Apply(getTransitRouterAvailableResourcesResult => getTransitRouterAvailableResourcesResult.Resources[0]?.MasterZones[0])),
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cen.CenFunctions;
import com.pulumi.alicloud.cen.inputs.GetTransitRouterAvailableResourcesArgs;
import com.pulumi.alicloud.cen.Instance;
import com.pulumi.alicloud.cen.InstanceArgs;
import com.pulumi.alicloud.cen.TransitRouter;
import com.pulumi.alicloud.cen.TransitRouterArgs;
import com.pulumi.alicloud.vpn.CustomerGateway;
import com.pulumi.alicloud.vpn.CustomerGatewayArgs;
import com.pulumi.alicloud.vpn.GatewayVpnAttachment;
import com.pulumi.alicloud.vpn.GatewayVpnAttachmentArgs;
import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentIkeConfigArgs;
import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentIpsecConfigArgs;
import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentBgpConfigArgs;
import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentHealthCheckConfigArgs;
import com.pulumi.alicloud.cen.TransitRouterCidr;
import com.pulumi.alicloud.cen.TransitRouterCidrArgs;
import com.pulumi.alicloud.cen.TransitRouterVpnAttachment;
import com.pulumi.alicloud.cen.TransitRouterVpnAttachmentArgs;
import com.pulumi.alicloud.cen.inputs.TransitRouterVpnAttachmentZoneArgs;
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("tf_example");
final var default = CenFunctions.getTransitRouterAvailableResources();
var example = new Instance("example", InstanceArgs.builder()
.cenInstanceName(name)
.build());
var exampleTransitRouter = new TransitRouter("exampleTransitRouter", TransitRouterArgs.builder()
.cenId(example.id())
.transitRouterDescription(name)
.transitRouterName(name)
.build());
var exampleCustomerGateway = new CustomerGateway("exampleCustomerGateway", CustomerGatewayArgs.builder()
.customerGatewayName(name)
.ipAddress("42.104.22.210")
.asn("45014")
.description(name)
.build());
var exampleGatewayVpnAttachment = new GatewayVpnAttachment("exampleGatewayVpnAttachment", GatewayVpnAttachmentArgs.builder()
.customerGatewayId(exampleCustomerGateway.id())
.networkType("public")
.localSubnet("0.0.0.0/0")
.remoteSubnet("0.0.0.0/0")
.effectImmediately(false)
.ikeConfig(GatewayVpnAttachmentIkeConfigArgs.builder()
.ikeAuthAlg("md5")
.ikeEncAlg("des")
.ikeVersion("ikev2")
.ikeMode("main")
.ikeLifetime(86400)
.psk("tf-testvpn2")
.ikePfs("group1")
.remoteId("testbob2")
.localId("testalice2")
.build())
.ipsecConfig(GatewayVpnAttachmentIpsecConfigArgs.builder()
.ipsecPfs("group5")
.ipsecEncAlg("des")
.ipsecAuthAlg("md5")
.ipsecLifetime(86400)
.build())
.bgpConfig(GatewayVpnAttachmentBgpConfigArgs.builder()
.enable(true)
.localAsn(45014)
.tunnelCidr("169.254.11.0/30")
.localBgpIp("169.254.11.1")
.build())
.healthCheckConfig(GatewayVpnAttachmentHealthCheckConfigArgs.builder()
.enable(true)
.sip("192.168.1.1")
.dip("10.0.0.1")
.interval(10)
.retry(10)
.policy("revoke_route")
.build())
.enableDpd(true)
.enableNatTraversal(true)
.vpnAttachmentName(name)
.build());
var exampleTransitRouterCidr = new TransitRouterCidr("exampleTransitRouterCidr", TransitRouterCidrArgs.builder()
.transitRouterId(exampleTransitRouter.transitRouterId())
.cidr("192.168.0.0/16")
.transitRouterCidrName(name)
.description(name)
.publishCidrRoute(true)
.build());
var exampleTransitRouterVpnAttachment = new TransitRouterVpnAttachment("exampleTransitRouterVpnAttachment", TransitRouterVpnAttachmentArgs.builder()
.autoPublishRouteEnabled(false)
.transitRouterAttachmentDescription(name)
.transitRouterAttachmentName(name)
.cenId(exampleTransitRouter.cenId())
.transitRouterId(exampleTransitRouterCidr.transitRouterId())
.vpnId(exampleGatewayVpnAttachment.id())
.zones(TransitRouterVpnAttachmentZoneArgs.builder()
.zoneId(default_.resources()[0].masterZones()[0])
.build())
.build());
}
}
configuration:
name:
type: string
default: tf_example
resources:
example:
type: alicloud:cen:Instance
properties:
cenInstanceName: ${name}
exampleTransitRouter:
type: alicloud:cen:TransitRouter
name: example
properties:
cenId: ${example.id}
transitRouterDescription: ${name}
transitRouterName: ${name}
exampleCustomerGateway:
type: alicloud:vpn:CustomerGateway
name: example
properties:
customerGatewayName: ${name}
ipAddress: 42.104.22.210
asn: '45014'
description: ${name}
exampleGatewayVpnAttachment:
type: alicloud:vpn:GatewayVpnAttachment
name: example
properties:
customerGatewayId: ${exampleCustomerGateway.id}
networkType: public
localSubnet: 0.0.0.0/0
remoteSubnet: 0.0.0.0/0
effectImmediately: false
ikeConfig:
ikeAuthAlg: md5
ikeEncAlg: des
ikeVersion: ikev2
ikeMode: main
ikeLifetime: 86400
psk: tf-testvpn2
ikePfs: group1
remoteId: testbob2
localId: testalice2
ipsecConfig:
ipsecPfs: group5
ipsecEncAlg: des
ipsecAuthAlg: md5
ipsecLifetime: 86400
bgpConfig:
enable: true
localAsn: 45014
tunnelCidr: 169.254.11.0/30
localBgpIp: 169.254.11.1
healthCheckConfig:
enable: true
sip: 192.168.1.1
dip: 10.0.0.1
interval: 10
retry: 10
policy: revoke_route
enableDpd: true
enableNatTraversal: true
vpnAttachmentName: ${name}
exampleTransitRouterCidr:
type: alicloud:cen:TransitRouterCidr
name: example
properties:
transitRouterId: ${exampleTransitRouter.transitRouterId}
cidr: 192.168.0.0/16
transitRouterCidrName: ${name}
description: ${name}
publishCidrRoute: true
exampleTransitRouterVpnAttachment:
type: alicloud:cen:TransitRouterVpnAttachment
name: example
properties:
autoPublishRouteEnabled: false
transitRouterAttachmentDescription: ${name}
transitRouterAttachmentName: ${name}
cenId: ${exampleTransitRouter.cenId}
transitRouterId: ${exampleTransitRouterCidr.transitRouterId}
vpnId: ${exampleGatewayVpnAttachment.id}
zones:
- zoneId: ${default.resources[0].masterZones[0]}
variables:
default:
fn::invoke:
Function: alicloud:cen:getTransitRouterAvailableResources
Arguments: {}
Create TransitRouterVpnAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TransitRouterVpnAttachment(name: string, args: TransitRouterVpnAttachmentArgs, opts?: CustomResourceOptions);
@overload
def TransitRouterVpnAttachment(resource_name: str,
args: TransitRouterVpnAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TransitRouterVpnAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
transit_router_id: Optional[str] = None,
vpn_id: Optional[str] = None,
zones: Optional[Sequence[TransitRouterVpnAttachmentZoneArgs]] = None,
auto_publish_route_enabled: Optional[bool] = None,
cen_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
transit_router_attachment_description: Optional[str] = None,
transit_router_attachment_name: Optional[str] = None,
vpn_owner_id: Optional[str] = None)
func NewTransitRouterVpnAttachment(ctx *Context, name string, args TransitRouterVpnAttachmentArgs, opts ...ResourceOption) (*TransitRouterVpnAttachment, error)
public TransitRouterVpnAttachment(string name, TransitRouterVpnAttachmentArgs args, CustomResourceOptions? opts = null)
public TransitRouterVpnAttachment(String name, TransitRouterVpnAttachmentArgs args)
public TransitRouterVpnAttachment(String name, TransitRouterVpnAttachmentArgs args, CustomResourceOptions options)
type: alicloud:cen:TransitRouterVpnAttachment
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 TransitRouterVpnAttachmentArgs
- 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 TransitRouterVpnAttachmentArgs
- 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 TransitRouterVpnAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TransitRouterVpnAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TransitRouterVpnAttachmentArgs
- 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 transitRouterVpnAttachmentResource = new AliCloud.Cen.TransitRouterVpnAttachment("transitRouterVpnAttachmentResource", new()
{
TransitRouterId = "string",
VpnId = "string",
Zones = new[]
{
new AliCloud.Cen.Inputs.TransitRouterVpnAttachmentZoneArgs
{
ZoneId = "string",
},
},
AutoPublishRouteEnabled = false,
CenId = "string",
Tags =
{
{ "string", "string" },
},
TransitRouterAttachmentDescription = "string",
TransitRouterAttachmentName = "string",
VpnOwnerId = "string",
});
example, err := cen.NewTransitRouterVpnAttachment(ctx, "transitRouterVpnAttachmentResource", &cen.TransitRouterVpnAttachmentArgs{
TransitRouterId: pulumi.String("string"),
VpnId: pulumi.String("string"),
Zones: cen.TransitRouterVpnAttachmentZoneArray{
&cen.TransitRouterVpnAttachmentZoneArgs{
ZoneId: pulumi.String("string"),
},
},
AutoPublishRouteEnabled: pulumi.Bool(false),
CenId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TransitRouterAttachmentDescription: pulumi.String("string"),
TransitRouterAttachmentName: pulumi.String("string"),
VpnOwnerId: pulumi.String("string"),
})
var transitRouterVpnAttachmentResource = new TransitRouterVpnAttachment("transitRouterVpnAttachmentResource", TransitRouterVpnAttachmentArgs.builder()
.transitRouterId("string")
.vpnId("string")
.zones(TransitRouterVpnAttachmentZoneArgs.builder()
.zoneId("string")
.build())
.autoPublishRouteEnabled(false)
.cenId("string")
.tags(Map.of("string", "string"))
.transitRouterAttachmentDescription("string")
.transitRouterAttachmentName("string")
.vpnOwnerId("string")
.build());
transit_router_vpn_attachment_resource = alicloud.cen.TransitRouterVpnAttachment("transitRouterVpnAttachmentResource",
transit_router_id="string",
vpn_id="string",
zones=[{
"zone_id": "string",
}],
auto_publish_route_enabled=False,
cen_id="string",
tags={
"string": "string",
},
transit_router_attachment_description="string",
transit_router_attachment_name="string",
vpn_owner_id="string")
const transitRouterVpnAttachmentResource = new alicloud.cen.TransitRouterVpnAttachment("transitRouterVpnAttachmentResource", {
transitRouterId: "string",
vpnId: "string",
zones: [{
zoneId: "string",
}],
autoPublishRouteEnabled: false,
cenId: "string",
tags: {
string: "string",
},
transitRouterAttachmentDescription: "string",
transitRouterAttachmentName: "string",
vpnOwnerId: "string",
});
type: alicloud:cen:TransitRouterVpnAttachment
properties:
autoPublishRouteEnabled: false
cenId: string
tags:
string: string
transitRouterAttachmentDescription: string
transitRouterAttachmentName: string
transitRouterId: string
vpnId: string
vpnOwnerId: string
zones:
- zoneId: string
TransitRouterVpnAttachment 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 TransitRouterVpnAttachment resource accepts the following input properties:
- Transit
Router stringId - The ID of the forwarding router instance.
- Vpn
Id string - The id of the vpn.
- Zones
List<Pulumi.
Ali Cloud. Cen. Inputs. Transit Router Vpn Attachment Zone> - The list of zone mapping. See
zone
below. - Auto
Publish boolRoute Enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- Cen
Id string - The id of the cen.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Transit
Router stringAttachment Description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - Transit
Router stringAttachment Name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - Vpn
Owner stringId - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account.
- Transit
Router stringId - The ID of the forwarding router instance.
- Vpn
Id string - The id of the vpn.
- Zones
[]Transit
Router Vpn Attachment Zone Args - The list of zone mapping. See
zone
below. - Auto
Publish boolRoute Enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- Cen
Id string - The id of the cen.
- map[string]string
- A mapping of tags to assign to the resource.
- Transit
Router stringAttachment Description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - Transit
Router stringAttachment Name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - Vpn
Owner stringId - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account.
- transit
Router StringId - The ID of the forwarding router instance.
- vpn
Id String - The id of the vpn.
- zones
List<Transit
Router Vpn Attachment Zone> - The list of zone mapping. See
zone
below. - auto
Publish BooleanRoute Enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- cen
Id String - The id of the cen.
- Map<String,String>
- A mapping of tags to assign to the resource.
- transit
Router StringAttachment Description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - transit
Router StringAttachment Name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - vpn
Owner StringId - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account.
- transit
Router stringId - The ID of the forwarding router instance.
- vpn
Id string - The id of the vpn.
- zones
Transit
Router Vpn Attachment Zone[] - The list of zone mapping. See
zone
below. - auto
Publish booleanRoute Enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- cen
Id string - The id of the cen.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- transit
Router stringAttachment Description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - transit
Router stringAttachment Name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - vpn
Owner stringId - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account.
- transit_
router_ strid - The ID of the forwarding router instance.
- vpn_
id str - The id of the vpn.
- zones
Sequence[Transit
Router Vpn Attachment Zone Args] - The list of zone mapping. See
zone
below. - auto_
publish_ boolroute_ enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- cen_
id str - The id of the cen.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- transit_
router_ strattachment_ description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - transit_
router_ strattachment_ name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - vpn_
owner_ strid - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account.
- transit
Router StringId - The ID of the forwarding router instance.
- vpn
Id String - The id of the vpn.
- zones List<Property Map>
- The list of zone mapping. See
zone
below. - auto
Publish BooleanRoute Enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- cen
Id String - The id of the cen.
- Map<String>
- A mapping of tags to assign to the resource.
- transit
Router StringAttachment Description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - transit
Router StringAttachment Name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - vpn
Owner StringId - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account.
Outputs
All input properties are implicitly available as output properties. Additionally, the TransitRouterVpnAttachment resource produces the following output properties:
Look up Existing TransitRouterVpnAttachment Resource
Get an existing TransitRouterVpnAttachment 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?: TransitRouterVpnAttachmentState, opts?: CustomResourceOptions): TransitRouterVpnAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_publish_route_enabled: Optional[bool] = None,
cen_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
transit_router_attachment_description: Optional[str] = None,
transit_router_attachment_name: Optional[str] = None,
transit_router_id: Optional[str] = None,
vpn_id: Optional[str] = None,
vpn_owner_id: Optional[str] = None,
zones: Optional[Sequence[TransitRouterVpnAttachmentZoneArgs]] = None) -> TransitRouterVpnAttachment
func GetTransitRouterVpnAttachment(ctx *Context, name string, id IDInput, state *TransitRouterVpnAttachmentState, opts ...ResourceOption) (*TransitRouterVpnAttachment, error)
public static TransitRouterVpnAttachment Get(string name, Input<string> id, TransitRouterVpnAttachmentState? state, CustomResourceOptions? opts = null)
public static TransitRouterVpnAttachment get(String name, Output<String> id, TransitRouterVpnAttachmentState 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.
- Auto
Publish boolRoute Enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- Cen
Id string - The id of the cen.
- Status string
- The associating status of the network.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Transit
Router stringAttachment Description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - Transit
Router stringAttachment Name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - Transit
Router stringId - The ID of the forwarding router instance.
- Vpn
Id string - The id of the vpn.
- Vpn
Owner stringId - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account. - Zones
List<Pulumi.
Ali Cloud. Cen. Inputs. Transit Router Vpn Attachment Zone> - The list of zone mapping. See
zone
below.
- Auto
Publish boolRoute Enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- Cen
Id string - The id of the cen.
- Status string
- The associating status of the network.
- map[string]string
- A mapping of tags to assign to the resource.
- Transit
Router stringAttachment Description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - Transit
Router stringAttachment Name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - Transit
Router stringId - The ID of the forwarding router instance.
- Vpn
Id string - The id of the vpn.
- Vpn
Owner stringId - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account. - Zones
[]Transit
Router Vpn Attachment Zone Args - The list of zone mapping. See
zone
below.
- auto
Publish BooleanRoute Enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- cen
Id String - The id of the cen.
- status String
- The associating status of the network.
- Map<String,String>
- A mapping of tags to assign to the resource.
- transit
Router StringAttachment Description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - transit
Router StringAttachment Name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - transit
Router StringId - The ID of the forwarding router instance.
- vpn
Id String - The id of the vpn.
- vpn
Owner StringId - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account. - zones
List<Transit
Router Vpn Attachment Zone> - The list of zone mapping. See
zone
below.
- auto
Publish booleanRoute Enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- cen
Id string - The id of the cen.
- status string
- The associating status of the network.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- transit
Router stringAttachment Description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - transit
Router stringAttachment Name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - transit
Router stringId - The ID of the forwarding router instance.
- vpn
Id string - The id of the vpn.
- vpn
Owner stringId - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account. - zones
Transit
Router Vpn Attachment Zone[] - The list of zone mapping. See
zone
below.
- auto_
publish_ boolroute_ enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- cen_
id str - The id of the cen.
- status str
- The associating status of the network.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- transit_
router_ strattachment_ description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - transit_
router_ strattachment_ name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - transit_
router_ strid - The ID of the forwarding router instance.
- vpn_
id str - The id of the vpn.
- vpn_
owner_ strid - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account. - zones
Sequence[Transit
Router Vpn Attachment Zone Args] - The list of zone mapping. See
zone
below.
- auto
Publish BooleanRoute Enabled - Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
- cen
Id String - The id of the cen.
- status String
- The associating status of the network.
- Map<String>
- A mapping of tags to assign to the resource.
- transit
Router StringAttachment Description - The description of the VPN connection. The description can contain
2
to256
characters. The description must start with English letters, but cannot start withhttp://
orhttps://
. - transit
Router StringAttachment Name - The name of the VPN connection. The name must be
2
to128
characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter. - transit
Router StringId - The ID of the forwarding router instance.
- vpn
Id String - The id of the vpn.
- vpn
Owner StringId - The owner id of vpn. NOTE: You must set
vpn_owner_id
, if you want to connect the transit router to an IPsec-VPN connection that belongs to another Alibaba Cloud account. - zones List<Property Map>
- The list of zone mapping. See
zone
below.
Supporting Types
TransitRouterVpnAttachmentZone, TransitRouterVpnAttachmentZoneArgs
- Zone
Id string - The id of the zone.
- Zone
Id string - The id of the zone.
- zone
Id String - The id of the zone.
- zone
Id string - The id of the zone.
- zone_
id str - The id of the zone.
- zone
Id String - The id of the zone.
Import
Cloud Enterprise Network (CEN) Transit Router Vpn Attachment can be imported using the id, e.g.
$ pulumi import alicloud:cen/transitRouterVpnAttachment:TransitRouterVpnAttachment example <id>
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.