1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cen
  5. TransitRouterVpnAttachment
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.cen.TransitRouterVpnAttachment

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    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 exampleInstance = new alicloud.cen.Instance("exampleInstance", {cenInstanceName: name});
    const exampleTransitRouter = new alicloud.cen.TransitRouter("exampleTransitRouter", {
        cenId: exampleInstance.id,
        transitRouterDescription: name,
        transitRouterName: name,
    });
    const exampleCustomerGateway = new alicloud.vpn.CustomerGateway("exampleCustomerGateway", {
        ipAddress: "42.104.22.210",
        asn: "45014",
        description: name,
    });
    const exampleGatewayVpnAttachment = new alicloud.vpn.GatewayVpnAttachment("exampleGatewayVpnAttachment", {
        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("exampleTransitRouterCidr", {
        transitRouterId: exampleTransitRouter.transitRouterId,
        cidr: "192.168.0.0/16",
        transitRouterCidrName: name,
        description: name,
        publishCidrRoute: true,
    });
    const exampleTransitRouterVpnAttachment = new alicloud.cen.TransitRouterVpnAttachment("exampleTransitRouterVpnAttachment", {
        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_instance = alicloud.cen.Instance("exampleInstance", cen_instance_name=name)
    example_transit_router = alicloud.cen.TransitRouter("exampleTransitRouter",
        cen_id=example_instance.id,
        transit_router_description=name,
        transit_router_name=name)
    example_customer_gateway = alicloud.vpn.CustomerGateway("exampleCustomerGateway",
        ip_address="42.104.22.210",
        asn="45014",
        description=name)
    example_gateway_vpn_attachment = alicloud.vpn.GatewayVpnAttachment("exampleGatewayVpnAttachment",
        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=alicloud.vpn.GatewayVpnAttachmentIkeConfigArgs(
            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=alicloud.vpn.GatewayVpnAttachmentIpsecConfigArgs(
            ipsec_pfs="group5",
            ipsec_enc_alg="des",
            ipsec_auth_alg="md5",
            ipsec_lifetime=86400,
        ),
        bgp_config=alicloud.vpn.GatewayVpnAttachmentBgpConfigArgs(
            enable=True,
            local_asn=45014,
            tunnel_cidr="169.254.11.0/30",
            local_bgp_ip="169.254.11.1",
        ),
        health_check_config=alicloud.vpn.GatewayVpnAttachmentHealthCheckConfigArgs(
            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("exampleTransitRouterCidr",
        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("exampleTransitRouterVpnAttachment",
        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=[alicloud.cen.TransitRouterVpnAttachmentZoneArgs(
            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, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleInstance, err := cen.NewInstance(ctx, "exampleInstance", &cen.InstanceArgs{
    			CenInstanceName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		exampleTransitRouter, err := cen.NewTransitRouter(ctx, "exampleTransitRouter", &cen.TransitRouterArgs{
    			CenId:                    exampleInstance.ID(),
    			TransitRouterDescription: pulumi.String(name),
    			TransitRouterName:        pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		exampleCustomerGateway, err := vpn.NewCustomerGateway(ctx, "exampleCustomerGateway", &vpn.CustomerGatewayArgs{
    			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, "exampleGatewayVpnAttachment", &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, "exampleTransitRouterCidr", &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, "exampleTransitRouterVpnAttachment", &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 exampleInstance = new AliCloud.Cen.Instance("exampleInstance", new()
        {
            CenInstanceName = name,
        });
    
        var exampleTransitRouter = new AliCloud.Cen.TransitRouter("exampleTransitRouter", new()
        {
            CenId = exampleInstance.Id,
            TransitRouterDescription = name,
            TransitRouterName = name,
        });
    
        var exampleCustomerGateway = new AliCloud.Vpn.CustomerGateway("exampleCustomerGateway", new()
        {
            IpAddress = "42.104.22.210",
            Asn = "45014",
            Description = name,
        });
    
        var exampleGatewayVpnAttachment = new AliCloud.Vpn.GatewayVpnAttachment("exampleGatewayVpnAttachment", 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("exampleTransitRouterCidr", new()
        {
            TransitRouterId = exampleTransitRouter.TransitRouterId,
            Cidr = "192.168.0.0/16",
            TransitRouterCidrName = name,
            Description = name,
            PublishCidrRoute = true,
        });
    
        var exampleTransitRouterVpnAttachment = new AliCloud.Cen.TransitRouterVpnAttachment("exampleTransitRouterVpnAttachment", 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 exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()        
                .cenInstanceName(name)
                .build());
    
            var exampleTransitRouter = new TransitRouter("exampleTransitRouter", TransitRouterArgs.builder()        
                .cenId(exampleInstance.id())
                .transitRouterDescription(name)
                .transitRouterName(name)
                .build());
    
            var exampleCustomerGateway = new CustomerGateway("exampleCustomerGateway", CustomerGatewayArgs.builder()        
                .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:
      exampleInstance:
        type: alicloud:cen:Instance
        properties:
          cenInstanceName: ${name}
      exampleTransitRouter:
        type: alicloud:cen:TransitRouter
        properties:
          cenId: ${exampleInstance.id}
          transitRouterDescription: ${name}
          transitRouterName: ${name}
      exampleCustomerGateway:
        type: alicloud:vpn:CustomerGateway
        properties:
          ipAddress: 42.104.22.210
          asn: '45014'
          description: ${name}
      exampleGatewayVpnAttachment:
        type: alicloud:vpn:GatewayVpnAttachment
        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
        properties:
          transitRouterId: ${exampleTransitRouter.transitRouterId}
          cidr: 192.168.0.0/16
          transitRouterCidrName: ${name}
          description: ${name}
          publishCidrRoute: true
      exampleTransitRouterVpnAttachment:
        type: alicloud:cen:TransitRouterVpnAttachment
        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

    new TransitRouterVpnAttachment(name: string, args: TransitRouterVpnAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def TransitRouterVpnAttachment(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   auto_publish_route_enabled: Optional[bool] = None,
                                   cen_id: Optional[str] = None,
                                   tags: Optional[Mapping[str, Any]] = 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)
    @overload
    def TransitRouterVpnAttachment(resource_name: str,
                                   args: TransitRouterVpnAttachmentArgs,
                                   opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    The TransitRouterVpnAttachment resource accepts the following input properties:

    TransitRouterId string
    The ID of the forwarding router instance.
    VpnId string
    The id of the vpn.
    Zones List<Pulumi.AliCloud.Cen.Inputs.TransitRouterVpnAttachmentZone>
    The list of zone mapping. See zone below.
    AutoPublishRouteEnabled bool
    Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
    CenId string
    The id of the cen.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TransitRouterAttachmentDescription string
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    TransitRouterAttachmentName string
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    VpnOwnerId string
    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.
    TransitRouterId string
    The ID of the forwarding router instance.
    VpnId string
    The id of the vpn.
    Zones []TransitRouterVpnAttachmentZoneArgs
    The list of zone mapping. See zone below.
    AutoPublishRouteEnabled bool
    Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
    CenId string
    The id of the cen.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    TransitRouterAttachmentDescription string
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    TransitRouterAttachmentName string
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    VpnOwnerId string
    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.
    transitRouterId String
    The ID of the forwarding router instance.
    vpnId String
    The id of the vpn.
    zones List<TransitRouterVpnAttachmentZone>
    The list of zone mapping. See zone below.
    autoPublishRouteEnabled Boolean
    Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
    cenId String
    The id of the cen.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    transitRouterAttachmentDescription String
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    transitRouterAttachmentName String
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    vpnOwnerId String
    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.
    transitRouterId string
    The ID of the forwarding router instance.
    vpnId string
    The id of the vpn.
    zones TransitRouterVpnAttachmentZone[]
    The list of zone mapping. See zone below.
    autoPublishRouteEnabled boolean
    Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
    cenId string
    The id of the cen.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    transitRouterAttachmentDescription string
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    transitRouterAttachmentName string
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    vpnOwnerId string
    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_id str
    The ID of the forwarding router instance.
    vpn_id str
    The id of the vpn.
    zones Sequence[TransitRouterVpnAttachmentZoneArgs]
    The list of zone mapping. See zone below.
    auto_publish_route_enabled bool
    Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
    cen_id str
    The id of the cen.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    transit_router_attachment_description str
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    transit_router_attachment_name str
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    vpn_owner_id str
    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.
    transitRouterId String
    The ID of the forwarding router instance.
    vpnId String
    The id of the vpn.
    zones List<Property Map>
    The list of zone mapping. See zone below.
    autoPublishRouteEnabled Boolean
    Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
    cenId String
    The id of the cen.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    transitRouterAttachmentDescription String
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    transitRouterAttachmentName String
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    vpnOwnerId String
    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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The associating status of the network.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The associating status of the network.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The associating status of the network.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The associating status of the network.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The associating status of the network.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The associating status of the network.

    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, Any]] = 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.
    The following state arguments are supported:
    AutoPublishRouteEnabled bool
    Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
    CenId string
    The id of the cen.
    Status string
    The associating status of the network.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TransitRouterAttachmentDescription string
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    TransitRouterAttachmentName string
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    TransitRouterId string
    The ID of the forwarding router instance.
    VpnId string
    The id of the vpn.
    VpnOwnerId string
    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.AliCloud.Cen.Inputs.TransitRouterVpnAttachmentZone>
    The list of zone mapping. See zone below.
    AutoPublishRouteEnabled bool
    Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
    CenId string
    The id of the cen.
    Status string
    The associating status of the network.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    TransitRouterAttachmentDescription string
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    TransitRouterAttachmentName string
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    TransitRouterId string
    The ID of the forwarding router instance.
    VpnId string
    The id of the vpn.
    VpnOwnerId string
    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 []TransitRouterVpnAttachmentZoneArgs
    The list of zone mapping. See zone below.
    autoPublishRouteEnabled Boolean
    Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
    cenId String
    The id of the cen.
    status String
    The associating status of the network.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    transitRouterAttachmentDescription String
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    transitRouterAttachmentName String
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    transitRouterId String
    The ID of the forwarding router instance.
    vpnId String
    The id of the vpn.
    vpnOwnerId String
    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<TransitRouterVpnAttachmentZone>
    The list of zone mapping. See zone below.
    autoPublishRouteEnabled boolean
    Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
    cenId string
    The id of the cen.
    status string
    The associating status of the network.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    transitRouterAttachmentDescription string
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    transitRouterAttachmentName string
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    transitRouterId string
    The ID of the forwarding router instance.
    vpnId string
    The id of the vpn.
    vpnOwnerId string
    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 TransitRouterVpnAttachmentZone[]
    The list of zone mapping. See zone below.
    auto_publish_route_enabled bool
    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.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    transit_router_attachment_description str
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    transit_router_attachment_name str
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    transit_router_id str
    The ID of the forwarding router instance.
    vpn_id str
    The id of the vpn.
    vpn_owner_id str
    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[TransitRouterVpnAttachmentZoneArgs]
    The list of zone mapping. See zone below.
    autoPublishRouteEnabled Boolean
    Whether to allow the forwarding router instance to automatically publish routing entries to IPsec connections.
    cenId String
    The id of the cen.
    status String
    The associating status of the network.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    transitRouterAttachmentDescription String
    The description of the VPN connection. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.
    transitRouterAttachmentName String
    The name of the VPN connection. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.
    transitRouterId String
    The ID of the forwarding router instance.
    vpnId String
    The id of the vpn.
    vpnOwnerId String
    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

    ZoneId string
    The id of the zone.
    ZoneId string
    The id of the zone.
    zoneId String
    The id of the zone.
    zoneId string
    The id of the zone.
    zone_id str
    The id of the zone.
    zoneId 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>
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi