alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.cen.TransitRouterVpcAttachment

Provides a CEN transit router VPC attachment resource that associate the VPC with the CEN instance. What is Cen Transit Router VPC Attachment

NOTE: Available in 1.126.0+

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var transitRouterAttachmentName = config.Get("transitRouterAttachmentName") ?? "sdk_rebot_cen_tr_yaochi";
    var transitRouterAttachmentDescription = config.Get("transitRouterAttachmentDescription") ?? "sdk_rebot_cen_tr_yaochi";
    var defaultTransitRouterAvailableResources = AliCloud.Cen.GetTransitRouterAvailableResources.Invoke();

    var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
    {
        VpcName = "sdk_rebot_cen_tr_yaochi",
        CidrBlock = "192.168.0.0/16",
    });

    var defaultMaster = new AliCloud.Vpc.Switch("defaultMaster", new()
    {
        VswitchName = "sdk_rebot_cen_tr_yaochi",
        VpcId = defaultNetwork.Id,
        CidrBlock = "192.168.1.0/24",
        ZoneId = defaultTransitRouterAvailableResources.Apply(getTransitRouterAvailableResourcesResult => getTransitRouterAvailableResourcesResult.Resources[0]?.MasterZones[0]),
    });

    var defaultSlave = new AliCloud.Vpc.Switch("defaultSlave", new()
    {
        VswitchName = "sdk_rebot_cen_tr_yaochi",
        VpcId = defaultNetwork.Id,
        CidrBlock = "192.168.2.0/24",
        ZoneId = defaultTransitRouterAvailableResources.Apply(getTransitRouterAvailableResourcesResult => getTransitRouterAvailableResourcesResult.Resources[0]?.SlaveZones[0]),
    });

    var defaultInstance = new AliCloud.Cen.Instance("defaultInstance", new()
    {
        CenInstanceName = "sdk_rebot_cen_tr_yaochi",
        ProtectionLevel = "REDUCED",
    });

    var defaultTransitRouter = new AliCloud.Cen.TransitRouter("defaultTransitRouter", new()
    {
        CenId = defaultInstance.Id,
    });

    var defaultTransitRouterVpcAttachment = new AliCloud.Cen.TransitRouterVpcAttachment("defaultTransitRouterVpcAttachment", new()
    {
        CenId = defaultInstance.Id,
        TransitRouterId = defaultTransitRouter.TransitRouterId,
        VpcId = defaultNetwork.Id,
        ZoneMappings = new[]
        {
            new AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs
            {
                ZoneId = defaultTransitRouterAvailableResources.Apply(getTransitRouterAvailableResourcesResult => getTransitRouterAvailableResourcesResult.Resources[0]?.MasterZones[0]),
                VswitchId = defaultMaster.Id,
            },
            new AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs
            {
                ZoneId = defaultTransitRouterAvailableResources.Apply(getTransitRouterAvailableResourcesResult => getTransitRouterAvailableResourcesResult.Resources[0]?.SlaveZones[1]),
                VswitchId = defaultSlave.Id,
            },
        },
        TransitRouterAttachmentName = transitRouterAttachmentName,
        TransitRouterAttachmentDescription = transitRouterAttachmentDescription,
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"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, "")
		transitRouterAttachmentName := "sdk_rebot_cen_tr_yaochi"
		if param := cfg.Get("transitRouterAttachmentName"); param != "" {
			transitRouterAttachmentName = param
		}
		transitRouterAttachmentDescription := "sdk_rebot_cen_tr_yaochi"
		if param := cfg.Get("transitRouterAttachmentDescription"); param != "" {
			transitRouterAttachmentDescription = param
		}
		defaultTransitRouterAvailableResources, err := cen.GetTransitRouterAvailableResources(ctx, nil, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
			VpcName:   pulumi.String("sdk_rebot_cen_tr_yaochi"),
			CidrBlock: pulumi.String("192.168.0.0/16"),
		})
		if err != nil {
			return err
		}
		defaultMaster, err := vpc.NewSwitch(ctx, "defaultMaster", &vpc.SwitchArgs{
			VswitchName: pulumi.String("sdk_rebot_cen_tr_yaochi"),
			VpcId:       defaultNetwork.ID(),
			CidrBlock:   pulumi.String("192.168.1.0/24"),
			ZoneId:      *pulumi.String(defaultTransitRouterAvailableResources.Resources[0].MasterZones[0]),
		})
		if err != nil {
			return err
		}
		defaultSlave, err := vpc.NewSwitch(ctx, "defaultSlave", &vpc.SwitchArgs{
			VswitchName: pulumi.String("sdk_rebot_cen_tr_yaochi"),
			VpcId:       defaultNetwork.ID(),
			CidrBlock:   pulumi.String("192.168.2.0/24"),
			ZoneId:      *pulumi.String(defaultTransitRouterAvailableResources.Resources[0].SlaveZones[0]),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := cen.NewInstance(ctx, "defaultInstance", &cen.InstanceArgs{
			CenInstanceName: pulumi.String("sdk_rebot_cen_tr_yaochi"),
			ProtectionLevel: pulumi.String("REDUCED"),
		})
		if err != nil {
			return err
		}
		defaultTransitRouter, err := cen.NewTransitRouter(ctx, "defaultTransitRouter", &cen.TransitRouterArgs{
			CenId: defaultInstance.ID(),
		})
		if err != nil {
			return err
		}
		_, err = cen.NewTransitRouterVpcAttachment(ctx, "defaultTransitRouterVpcAttachment", &cen.TransitRouterVpcAttachmentArgs{
			CenId:           defaultInstance.ID(),
			TransitRouterId: defaultTransitRouter.TransitRouterId,
			VpcId:           defaultNetwork.ID(),
			ZoneMappings: cen.TransitRouterVpcAttachmentZoneMappingArray{
				&cen.TransitRouterVpcAttachmentZoneMappingArgs{
					ZoneId:    *pulumi.String(defaultTransitRouterAvailableResources.Resources[0].MasterZones[0]),
					VswitchId: defaultMaster.ID(),
				},
				&cen.TransitRouterVpcAttachmentZoneMappingArgs{
					ZoneId:    *pulumi.String(defaultTransitRouterAvailableResources.Resources[0].SlaveZones[1]),
					VswitchId: defaultSlave.ID(),
				},
			},
			TransitRouterAttachmentName:        pulumi.String(transitRouterAttachmentName),
			TransitRouterAttachmentDescription: pulumi.String(transitRouterAttachmentDescription),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
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.cen.TransitRouterVpcAttachment;
import com.pulumi.alicloud.cen.TransitRouterVpcAttachmentArgs;
import com.pulumi.alicloud.cen.inputs.TransitRouterVpcAttachmentZoneMappingArgs;
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 transitRouterAttachmentName = config.get("transitRouterAttachmentName").orElse("sdk_rebot_cen_tr_yaochi");
        final var transitRouterAttachmentDescription = config.get("transitRouterAttachmentDescription").orElse("sdk_rebot_cen_tr_yaochi");
        final var defaultTransitRouterAvailableResources = CenFunctions.getTransitRouterAvailableResources();

        var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()        
            .vpcName("sdk_rebot_cen_tr_yaochi")
            .cidrBlock("192.168.0.0/16")
            .build());

        var defaultMaster = new Switch("defaultMaster", SwitchArgs.builder()        
            .vswitchName("sdk_rebot_cen_tr_yaochi")
            .vpcId(defaultNetwork.id())
            .cidrBlock("192.168.1.0/24")
            .zoneId(defaultTransitRouterAvailableResources.applyValue(getTransitRouterAvailableResourcesResult -> getTransitRouterAvailableResourcesResult.resources()[0].masterZones()[0]))
            .build());

        var defaultSlave = new Switch("defaultSlave", SwitchArgs.builder()        
            .vswitchName("sdk_rebot_cen_tr_yaochi")
            .vpcId(defaultNetwork.id())
            .cidrBlock("192.168.2.0/24")
            .zoneId(defaultTransitRouterAvailableResources.applyValue(getTransitRouterAvailableResourcesResult -> getTransitRouterAvailableResourcesResult.resources()[0].slaveZones()[0]))
            .build());

        var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
            .cenInstanceName("sdk_rebot_cen_tr_yaochi")
            .protectionLevel("REDUCED")
            .build());

        var defaultTransitRouter = new TransitRouter("defaultTransitRouter", TransitRouterArgs.builder()        
            .cenId(defaultInstance.id())
            .build());

        var defaultTransitRouterVpcAttachment = new TransitRouterVpcAttachment("defaultTransitRouterVpcAttachment", TransitRouterVpcAttachmentArgs.builder()        
            .cenId(defaultInstance.id())
            .transitRouterId(defaultTransitRouter.transitRouterId())
            .vpcId(defaultNetwork.id())
            .zoneMappings(            
                TransitRouterVpcAttachmentZoneMappingArgs.builder()
                    .zoneId(defaultTransitRouterAvailableResources.applyValue(getTransitRouterAvailableResourcesResult -> getTransitRouterAvailableResourcesResult.resources()[0].masterZones()[0]))
                    .vswitchId(defaultMaster.id())
                    .build(),
                TransitRouterVpcAttachmentZoneMappingArgs.builder()
                    .zoneId(defaultTransitRouterAvailableResources.applyValue(getTransitRouterAvailableResourcesResult -> getTransitRouterAvailableResourcesResult.resources()[0].slaveZones()[1]))
                    .vswitchId(defaultSlave.id())
                    .build())
            .transitRouterAttachmentName(transitRouterAttachmentName)
            .transitRouterAttachmentDescription(transitRouterAttachmentDescription)
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
transit_router_attachment_name = config.get("transitRouterAttachmentName")
if transit_router_attachment_name is None:
    transit_router_attachment_name = "sdk_rebot_cen_tr_yaochi"
transit_router_attachment_description = config.get("transitRouterAttachmentDescription")
if transit_router_attachment_description is None:
    transit_router_attachment_description = "sdk_rebot_cen_tr_yaochi"
default_transit_router_available_resources = alicloud.cen.get_transit_router_available_resources()
default_network = alicloud.vpc.Network("defaultNetwork",
    vpc_name="sdk_rebot_cen_tr_yaochi",
    cidr_block="192.168.0.0/16")
default_master = alicloud.vpc.Switch("defaultMaster",
    vswitch_name="sdk_rebot_cen_tr_yaochi",
    vpc_id=default_network.id,
    cidr_block="192.168.1.0/24",
    zone_id=default_transit_router_available_resources.resources[0].master_zones[0])
default_slave = alicloud.vpc.Switch("defaultSlave",
    vswitch_name="sdk_rebot_cen_tr_yaochi",
    vpc_id=default_network.id,
    cidr_block="192.168.2.0/24",
    zone_id=default_transit_router_available_resources.resources[0].slave_zones[0])
default_instance = alicloud.cen.Instance("defaultInstance",
    cen_instance_name="sdk_rebot_cen_tr_yaochi",
    protection_level="REDUCED")
default_transit_router = alicloud.cen.TransitRouter("defaultTransitRouter", cen_id=default_instance.id)
default_transit_router_vpc_attachment = alicloud.cen.TransitRouterVpcAttachment("defaultTransitRouterVpcAttachment",
    cen_id=default_instance.id,
    transit_router_id=default_transit_router.transit_router_id,
    vpc_id=default_network.id,
    zone_mappings=[
        alicloud.cen.TransitRouterVpcAttachmentZoneMappingArgs(
            zone_id=default_transit_router_available_resources.resources[0].master_zones[0],
            vswitch_id=default_master.id,
        ),
        alicloud.cen.TransitRouterVpcAttachmentZoneMappingArgs(
            zone_id=default_transit_router_available_resources.resources[0].slave_zones[1],
            vswitch_id=default_slave.id,
        ),
    ],
    transit_router_attachment_name=transit_router_attachment_name,
    transit_router_attachment_description=transit_router_attachment_description)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const transitRouterAttachmentName = config.get("transitRouterAttachmentName") || "sdk_rebot_cen_tr_yaochi";
const transitRouterAttachmentDescription = config.get("transitRouterAttachmentDescription") || "sdk_rebot_cen_tr_yaochi";
const defaultTransitRouterAvailableResources = alicloud.cen.getTransitRouterAvailableResources({});
const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
    vpcName: "sdk_rebot_cen_tr_yaochi",
    cidrBlock: "192.168.0.0/16",
});
const defaultMaster = new alicloud.vpc.Switch("defaultMaster", {
    vswitchName: "sdk_rebot_cen_tr_yaochi",
    vpcId: defaultNetwork.id,
    cidrBlock: "192.168.1.0/24",
    zoneId: defaultTransitRouterAvailableResources.then(defaultTransitRouterAvailableResources => defaultTransitRouterAvailableResources.resources?.[0]?.masterZones?.[0]),
});
const defaultSlave = new alicloud.vpc.Switch("defaultSlave", {
    vswitchName: "sdk_rebot_cen_tr_yaochi",
    vpcId: defaultNetwork.id,
    cidrBlock: "192.168.2.0/24",
    zoneId: defaultTransitRouterAvailableResources.then(defaultTransitRouterAvailableResources => defaultTransitRouterAvailableResources.resources?.[0]?.slaveZones?.[0]),
});
const defaultInstance = new alicloud.cen.Instance("defaultInstance", {
    cenInstanceName: "sdk_rebot_cen_tr_yaochi",
    protectionLevel: "REDUCED",
});
const defaultTransitRouter = new alicloud.cen.TransitRouter("defaultTransitRouter", {cenId: defaultInstance.id});
const defaultTransitRouterVpcAttachment = new alicloud.cen.TransitRouterVpcAttachment("defaultTransitRouterVpcAttachment", {
    cenId: defaultInstance.id,
    transitRouterId: defaultTransitRouter.transitRouterId,
    vpcId: defaultNetwork.id,
    zoneMappings: [
        {
            zoneId: defaultTransitRouterAvailableResources.then(defaultTransitRouterAvailableResources => defaultTransitRouterAvailableResources.resources?.[0]?.masterZones?.[0]),
            vswitchId: defaultMaster.id,
        },
        {
            zoneId: defaultTransitRouterAvailableResources.then(defaultTransitRouterAvailableResources => defaultTransitRouterAvailableResources.resources?.[0]?.slaveZones?.[1]),
            vswitchId: defaultSlave.id,
        },
    ],
    transitRouterAttachmentName: transitRouterAttachmentName,
    transitRouterAttachmentDescription: transitRouterAttachmentDescription,
});
configuration:
  transitRouterAttachmentName:
    type: string
    default: sdk_rebot_cen_tr_yaochi
  transitRouterAttachmentDescription:
    type: string
    default: sdk_rebot_cen_tr_yaochi
resources:
  defaultNetwork:
    type: alicloud:vpc:Network
    properties:
      vpcName: sdk_rebot_cen_tr_yaochi
      cidrBlock: 192.168.0.0/16
  defaultMaster:
    type: alicloud:vpc:Switch
    properties:
      vswitchName: sdk_rebot_cen_tr_yaochi
      vpcId: ${defaultNetwork.id}
      cidrBlock: 192.168.1.0/24
      zoneId: ${defaultTransitRouterAvailableResources.resources[0].masterZones[0]}
  defaultSlave:
    type: alicloud:vpc:Switch
    properties:
      vswitchName: sdk_rebot_cen_tr_yaochi
      vpcId: ${defaultNetwork.id}
      cidrBlock: 192.168.2.0/24
      zoneId: ${defaultTransitRouterAvailableResources.resources[0].slaveZones[0]}
  defaultInstance:
    type: alicloud:cen:Instance
    properties:
      cenInstanceName: sdk_rebot_cen_tr_yaochi
      protectionLevel: REDUCED
  defaultTransitRouter:
    type: alicloud:cen:TransitRouter
    properties:
      cenId: ${defaultInstance.id}
  defaultTransitRouterVpcAttachment:
    type: alicloud:cen:TransitRouterVpcAttachment
    properties:
      cenId: ${defaultInstance.id}
      transitRouterId: ${defaultTransitRouter.transitRouterId}
      vpcId: ${defaultNetwork.id}
      zoneMappings:
        - zoneId: ${defaultTransitRouterAvailableResources.resources[0].masterZones[0]}
          vswitchId: ${defaultMaster.id}
        - zoneId: ${defaultTransitRouterAvailableResources.resources[0].slaveZones[1]}
          vswitchId: ${defaultSlave.id}
      transitRouterAttachmentName: ${transitRouterAttachmentName}
      transitRouterAttachmentDescription: ${transitRouterAttachmentDescription}
variables:
  defaultTransitRouterAvailableResources:
    fn::invoke:
      Function: alicloud:cen:getTransitRouterAvailableResources
      Arguments: {}

Create TransitRouterVpcAttachment Resource

new TransitRouterVpcAttachment(name: string, args: TransitRouterVpcAttachmentArgs, opts?: CustomResourceOptions);
@overload
def TransitRouterVpcAttachment(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               cen_id: Optional[str] = None,
                               dry_run: Optional[bool] = None,
                               payment_type: Optional[str] = None,
                               resource_type: Optional[str] = None,
                               route_table_association_enabled: Optional[bool] = None,
                               route_table_propagation_enabled: Optional[bool] = 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,
                               vpc_id: Optional[str] = None,
                               vpc_owner_id: Optional[str] = None,
                               zone_mappings: Optional[Sequence[TransitRouterVpcAttachmentZoneMappingArgs]] = None)
@overload
def TransitRouterVpcAttachment(resource_name: str,
                               args: TransitRouterVpcAttachmentArgs,
                               opts: Optional[ResourceOptions] = None)
func NewTransitRouterVpcAttachment(ctx *Context, name string, args TransitRouterVpcAttachmentArgs, opts ...ResourceOption) (*TransitRouterVpcAttachment, error)
public TransitRouterVpcAttachment(string name, TransitRouterVpcAttachmentArgs args, CustomResourceOptions? opts = null)
public TransitRouterVpcAttachment(String name, TransitRouterVpcAttachmentArgs args)
public TransitRouterVpcAttachment(String name, TransitRouterVpcAttachmentArgs args, CustomResourceOptions options)
type: alicloud:cen:TransitRouterVpcAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args TransitRouterVpcAttachmentArgs
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 TransitRouterVpcAttachmentArgs
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 TransitRouterVpcAttachmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TransitRouterVpcAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args TransitRouterVpcAttachmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

CenId string

The ID of the CEN.

VpcId string

The ID of the VPC.

ZoneMappings List<Pulumi.AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs>

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

DryRun bool

The dry run.

PaymentType string

The payment type of the resource. Valid values: PayAsYouGo.

ResourceType string

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

RouteTableAssociationEnabled bool

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

RouteTablePropagationEnabled bool

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

TransitRouterAttachmentDescription string

The description of the transit router vbr attachment.

TransitRouterAttachmentName string

The name of the transit router vbr attachment.

TransitRouterId string

The ID of the transit router.

VpcOwnerId string

The owner id of vpc.

CenId string

The ID of the CEN.

VpcId string

The ID of the VPC.

ZoneMappings []TransitRouterVpcAttachmentZoneMappingArgs

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

DryRun bool

The dry run.

PaymentType string

The payment type of the resource. Valid values: PayAsYouGo.

ResourceType string

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

RouteTableAssociationEnabled bool

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

RouteTablePropagationEnabled bool

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

TransitRouterAttachmentDescription string

The description of the transit router vbr attachment.

TransitRouterAttachmentName string

The name of the transit router vbr attachment.

TransitRouterId string

The ID of the transit router.

VpcOwnerId string

The owner id of vpc.

cenId String

The ID of the CEN.

vpcId String

The ID of the VPC.

zoneMappings List<TransitRouterVpcAttachmentZoneMappingArgs>

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

dryRun Boolean

The dry run.

paymentType String

The payment type of the resource. Valid values: PayAsYouGo.

resourceType String

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

routeTableAssociationEnabled Boolean

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

routeTablePropagationEnabled Boolean

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

tags Map<String,Object>

A mapping of tags to assign to the resource.

transitRouterAttachmentDescription String

The description of the transit router vbr attachment.

transitRouterAttachmentName String

The name of the transit router vbr attachment.

transitRouterId String

The ID of the transit router.

vpcOwnerId String

The owner id of vpc.

cenId string

The ID of the CEN.

vpcId string

The ID of the VPC.

zoneMappings TransitRouterVpcAttachmentZoneMappingArgs[]

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

dryRun boolean

The dry run.

paymentType string

The payment type of the resource. Valid values: PayAsYouGo.

resourceType string

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

routeTableAssociationEnabled boolean

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

routeTablePropagationEnabled boolean

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

transitRouterAttachmentDescription string

The description of the transit router vbr attachment.

transitRouterAttachmentName string

The name of the transit router vbr attachment.

transitRouterId string

The ID of the transit router.

vpcOwnerId string

The owner id of vpc.

cen_id str

The ID of the CEN.

vpc_id str

The ID of the VPC.

zone_mappings Sequence[TransitRouterVpcAttachmentZoneMappingArgs]

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

dry_run bool

The dry run.

payment_type str

The payment type of the resource. Valid values: PayAsYouGo.

resource_type str

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

route_table_association_enabled bool

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

route_table_propagation_enabled bool

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

tags Mapping[str, Any]

A mapping of tags to assign to the resource.

transit_router_attachment_description str

The description of the transit router vbr attachment.

transit_router_attachment_name str

The name of the transit router vbr attachment.

transit_router_id str

The ID of the transit router.

vpc_owner_id str

The owner id of vpc.

cenId String

The ID of the CEN.

vpcId String

The ID of the VPC.

zoneMappings List<Property Map>

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

dryRun Boolean

The dry run.

paymentType String

The payment type of the resource. Valid values: PayAsYouGo.

resourceType String

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

routeTableAssociationEnabled Boolean

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

routeTablePropagationEnabled Boolean

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

tags Map<Any>

A mapping of tags to assign to the resource.

transitRouterAttachmentDescription String

The description of the transit router vbr attachment.

transitRouterAttachmentName String

The name of the transit router vbr attachment.

transitRouterId String

The ID of the transit router.

vpcOwnerId String

The owner id of vpc.

Outputs

All input properties are implicitly available as output properties. Additionally, the TransitRouterVpcAttachment 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.

TransitRouterAttachmentId string

The ID of transit router attachment.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The associating status of the network.

TransitRouterAttachmentId string

The ID of transit router attachment.

id String

The provider-assigned unique ID for this managed resource.

status String

The associating status of the network.

transitRouterAttachmentId String

The ID of transit router attachment.

id string

The provider-assigned unique ID for this managed resource.

status string

The associating status of the network.

transitRouterAttachmentId string

The ID of transit router attachment.

id str

The provider-assigned unique ID for this managed resource.

status str

The associating status of the network.

transit_router_attachment_id str

The ID of transit router attachment.

id String

The provider-assigned unique ID for this managed resource.

status String

The associating status of the network.

transitRouterAttachmentId String

The ID of transit router attachment.

Look up Existing TransitRouterVpcAttachment Resource

Get an existing TransitRouterVpcAttachment 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?: TransitRouterVpcAttachmentState, opts?: CustomResourceOptions): TransitRouterVpcAttachment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cen_id: Optional[str] = None,
        dry_run: Optional[bool] = None,
        payment_type: Optional[str] = None,
        resource_type: Optional[str] = None,
        route_table_association_enabled: Optional[bool] = None,
        route_table_propagation_enabled: Optional[bool] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, Any]] = None,
        transit_router_attachment_description: Optional[str] = None,
        transit_router_attachment_id: Optional[str] = None,
        transit_router_attachment_name: Optional[str] = None,
        transit_router_id: Optional[str] = None,
        vpc_id: Optional[str] = None,
        vpc_owner_id: Optional[str] = None,
        zone_mappings: Optional[Sequence[TransitRouterVpcAttachmentZoneMappingArgs]] = None) -> TransitRouterVpcAttachment
func GetTransitRouterVpcAttachment(ctx *Context, name string, id IDInput, state *TransitRouterVpcAttachmentState, opts ...ResourceOption) (*TransitRouterVpcAttachment, error)
public static TransitRouterVpcAttachment Get(string name, Input<string> id, TransitRouterVpcAttachmentState? state, CustomResourceOptions? opts = null)
public static TransitRouterVpcAttachment get(String name, Output<String> id, TransitRouterVpcAttachmentState 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:
CenId string

The ID of the CEN.

DryRun bool

The dry run.

PaymentType string

The payment type of the resource. Valid values: PayAsYouGo.

ResourceType string

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

RouteTableAssociationEnabled bool

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

RouteTablePropagationEnabled bool

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

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 transit router vbr attachment.

TransitRouterAttachmentId string

The ID of transit router attachment.

TransitRouterAttachmentName string

The name of the transit router vbr attachment.

TransitRouterId string

The ID of the transit router.

VpcId string

The ID of the VPC.

VpcOwnerId string

The owner id of vpc.

ZoneMappings List<Pulumi.AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs>

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

CenId string

The ID of the CEN.

DryRun bool

The dry run.

PaymentType string

The payment type of the resource. Valid values: PayAsYouGo.

ResourceType string

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

RouteTableAssociationEnabled bool

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

RouteTablePropagationEnabled bool

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

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 transit router vbr attachment.

TransitRouterAttachmentId string

The ID of transit router attachment.

TransitRouterAttachmentName string

The name of the transit router vbr attachment.

TransitRouterId string

The ID of the transit router.

VpcId string

The ID of the VPC.

VpcOwnerId string

The owner id of vpc.

ZoneMappings []TransitRouterVpcAttachmentZoneMappingArgs

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

cenId String

The ID of the CEN.

dryRun Boolean

The dry run.

paymentType String

The payment type of the resource. Valid values: PayAsYouGo.

resourceType String

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

routeTableAssociationEnabled Boolean

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

routeTablePropagationEnabled Boolean

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

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 transit router vbr attachment.

transitRouterAttachmentId String

The ID of transit router attachment.

transitRouterAttachmentName String

The name of the transit router vbr attachment.

transitRouterId String

The ID of the transit router.

vpcId String

The ID of the VPC.

vpcOwnerId String

The owner id of vpc.

zoneMappings List<TransitRouterVpcAttachmentZoneMappingArgs>

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

cenId string

The ID of the CEN.

dryRun boolean

The dry run.

paymentType string

The payment type of the resource. Valid values: PayAsYouGo.

resourceType string

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

routeTableAssociationEnabled boolean

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

routeTablePropagationEnabled boolean

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

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 transit router vbr attachment.

transitRouterAttachmentId string

The ID of transit router attachment.

transitRouterAttachmentName string

The name of the transit router vbr attachment.

transitRouterId string

The ID of the transit router.

vpcId string

The ID of the VPC.

vpcOwnerId string

The owner id of vpc.

zoneMappings TransitRouterVpcAttachmentZoneMappingArgs[]

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

cen_id str

The ID of the CEN.

dry_run bool

The dry run.

payment_type str

The payment type of the resource. Valid values: PayAsYouGo.

resource_type str

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

route_table_association_enabled bool

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

route_table_propagation_enabled bool

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

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 transit router vbr attachment.

transit_router_attachment_id str

The ID of transit router attachment.

transit_router_attachment_name str

The name of the transit router vbr attachment.

transit_router_id str

The ID of the transit router.

vpc_id str

The ID of the VPC.

vpc_owner_id str

The owner id of vpc.

zone_mappings Sequence[TransitRouterVpcAttachmentZoneMappingArgs]

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

cenId String

The ID of the CEN.

dryRun Boolean

The dry run.

paymentType String

The payment type of the resource. Valid values: PayAsYouGo.

resourceType String

The resource type of transit router vpc attachment. Valid value VPC. Default value is VPC.

routeTableAssociationEnabled Boolean

Deprecated:

Field 'route_table_association_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_association' instead.

routeTablePropagationEnabled Boolean

Deprecated:

Field 'route_table_propagation_enabled' has been deprecated from provider version 1.192.0. Please use the resource 'alicloud_cen_transit_router_route_table_propagation' instead.

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 transit router vbr attachment.

transitRouterAttachmentId String

The ID of transit router attachment.

transitRouterAttachmentName String

The name of the transit router vbr attachment.

transitRouterId String

The ID of the transit router.

vpcId String

The ID of the VPC.

vpcOwnerId String

The owner id of vpc.

zoneMappings List<Property Map>

The list of zone mapping of the VPC. NOTE: From version 1.184.0, zone_mappings can be modified.

NOTE: The Zone of CEN has MasterZone and SlaveZone, first zone_id of zone_mapping need be MasterZone. We have a API to describeZonesAPI

Supporting Types

TransitRouterVpcAttachmentZoneMapping

VswitchId string

The VSwitch id of attachment.

ZoneId string

The zone Id of VSwitch.

VswitchId string

The VSwitch id of attachment.

ZoneId string

The zone Id of VSwitch.

vswitchId String

The VSwitch id of attachment.

zoneId String

The zone Id of VSwitch.

vswitchId string

The VSwitch id of attachment.

zoneId string

The zone Id of VSwitch.

vswitch_id str

The VSwitch id of attachment.

zone_id str

The zone Id of VSwitch.

vswitchId String

The VSwitch id of attachment.

zoneId String

The zone Id of VSwitch.

Import

CEN instance can be imported using the id, e.g.

 $ pulumi import alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment example tr-********:tr-attach-********

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.