1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cen
  5. TransitRouterVpcAttachment
Alibaba Cloud v3.49.0 published on Sunday, Feb 4, 2024 by Pulumi

alicloud.cen.TransitRouterVpcAttachment

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.49.0 published on Sunday, Feb 4, 2024 by Pulumi

    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 since v1.126.0.

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = AliCloud.Cen.GetTransitRouterAvailableResources.Invoke();
    
        var masterZone = @default.Apply(@default => @default.Apply(getTransitRouterAvailableResourcesResult => getTransitRouterAvailableResourcesResult.Resources[0]?.MasterZones[0]));
    
        var slaveZone = @default.Apply(@default => @default.Apply(getTransitRouterAvailableResourcesResult => getTransitRouterAvailableResourcesResult.Resources[0]?.SlaveZones[1]));
    
        var exampleNetwork = new AliCloud.Vpc.Network("exampleNetwork", new()
        {
            VpcName = name,
            CidrBlock = "192.168.0.0/16",
        });
    
        var exampleMaster = new AliCloud.Vpc.Switch("exampleMaster", new()
        {
            VswitchName = name,
            CidrBlock = "192.168.1.0/24",
            VpcId = exampleNetwork.Id,
            ZoneId = masterZone,
        });
    
        var exampleSlave = new AliCloud.Vpc.Switch("exampleSlave", new()
        {
            VswitchName = name,
            CidrBlock = "192.168.2.0/24",
            VpcId = exampleNetwork.Id,
            ZoneId = slaveZone,
        });
    
        var exampleInstance = new AliCloud.Cen.Instance("exampleInstance", new()
        {
            CenInstanceName = name,
            ProtectionLevel = "REDUCED",
        });
    
        var exampleTransitRouter = new AliCloud.Cen.TransitRouter("exampleTransitRouter", new()
        {
            TransitRouterName = name,
            CenId = exampleInstance.Id,
        });
    
        var exampleTransitRouterVpcAttachment = new AliCloud.Cen.TransitRouterVpcAttachment("exampleTransitRouterVpcAttachment", new()
        {
            CenId = exampleInstance.Id,
            TransitRouterId = exampleTransitRouter.TransitRouterId,
            VpcId = exampleNetwork.Id,
            ZoneMappings = new[]
            {
                new AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs
                {
                    ZoneId = masterZone,
                    VswitchId = exampleMaster.Id,
                },
                new AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs
                {
                    ZoneId = slaveZone,
                    VswitchId = exampleSlave.Id,
                },
            },
            TransitRouterAttachmentName = name,
            TransitRouterAttachmentDescription = name,
        });
    
    });
    
    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, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := cen.GetTransitRouterAvailableResources(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		masterZone := _default.Resources[0].MasterZones[0]
    		slaveZone := _default.Resources[0].SlaveZones[1]
    		exampleNetwork, err := vpc.NewNetwork(ctx, "exampleNetwork", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("192.168.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleMaster, err := vpc.NewSwitch(ctx, "exampleMaster", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("192.168.1.0/24"),
    			VpcId:       exampleNetwork.ID(),
    			ZoneId:      *pulumi.String(masterZone),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSlave, err := vpc.NewSwitch(ctx, "exampleSlave", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("192.168.2.0/24"),
    			VpcId:       exampleNetwork.ID(),
    			ZoneId:      *pulumi.String(slaveZone),
    		})
    		if err != nil {
    			return err
    		}
    		exampleInstance, err := cen.NewInstance(ctx, "exampleInstance", &cen.InstanceArgs{
    			CenInstanceName: pulumi.String(name),
    			ProtectionLevel: pulumi.String("REDUCED"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleTransitRouter, err := cen.NewTransitRouter(ctx, "exampleTransitRouter", &cen.TransitRouterArgs{
    			TransitRouterName: pulumi.String(name),
    			CenId:             exampleInstance.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cen.NewTransitRouterVpcAttachment(ctx, "exampleTransitRouterVpcAttachment", &cen.TransitRouterVpcAttachmentArgs{
    			CenId:           exampleInstance.ID(),
    			TransitRouterId: exampleTransitRouter.TransitRouterId,
    			VpcId:           exampleNetwork.ID(),
    			ZoneMappings: cen.TransitRouterVpcAttachmentZoneMappingArray{
    				&cen.TransitRouterVpcAttachmentZoneMappingArgs{
    					ZoneId:    *pulumi.String(masterZone),
    					VswitchId: exampleMaster.ID(),
    				},
    				&cen.TransitRouterVpcAttachmentZoneMappingArgs{
    					ZoneId:    *pulumi.String(slaveZone),
    					VswitchId: exampleSlave.ID(),
    				},
    			},
    			TransitRouterAttachmentName:        pulumi.String(name),
    			TransitRouterAttachmentDescription: pulumi.String(name),
    		})
    		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 name = config.get("name").orElse("terraform-example");
            final var default = CenFunctions.getTransitRouterAvailableResources();
    
            final var masterZone = default_.resources()[0].masterZones()[0];
    
            final var slaveZone = default_.resources()[0].slaveZones()[1];
    
            var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()        
                .vpcName(name)
                .cidrBlock("192.168.0.0/16")
                .build());
    
            var exampleMaster = new Switch("exampleMaster", SwitchArgs.builder()        
                .vswitchName(name)
                .cidrBlock("192.168.1.0/24")
                .vpcId(exampleNetwork.id())
                .zoneId(masterZone)
                .build());
    
            var exampleSlave = new Switch("exampleSlave", SwitchArgs.builder()        
                .vswitchName(name)
                .cidrBlock("192.168.2.0/24")
                .vpcId(exampleNetwork.id())
                .zoneId(slaveZone)
                .build());
    
            var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()        
                .cenInstanceName(name)
                .protectionLevel("REDUCED")
                .build());
    
            var exampleTransitRouter = new TransitRouter("exampleTransitRouter", TransitRouterArgs.builder()        
                .transitRouterName(name)
                .cenId(exampleInstance.id())
                .build());
    
            var exampleTransitRouterVpcAttachment = new TransitRouterVpcAttachment("exampleTransitRouterVpcAttachment", TransitRouterVpcAttachmentArgs.builder()        
                .cenId(exampleInstance.id())
                .transitRouterId(exampleTransitRouter.transitRouterId())
                .vpcId(exampleNetwork.id())
                .zoneMappings(            
                    TransitRouterVpcAttachmentZoneMappingArgs.builder()
                        .zoneId(masterZone)
                        .vswitchId(exampleMaster.id())
                        .build(),
                    TransitRouterVpcAttachmentZoneMappingArgs.builder()
                        .zoneId(slaveZone)
                        .vswitchId(exampleSlave.id())
                        .build())
                .transitRouterAttachmentName(name)
                .transitRouterAttachmentDescription(name)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.cen.get_transit_router_available_resources()
    master_zone = default.resources[0].master_zones[0]
    slave_zone = default.resources[0].slave_zones[1]
    example_network = alicloud.vpc.Network("exampleNetwork",
        vpc_name=name,
        cidr_block="192.168.0.0/16")
    example_master = alicloud.vpc.Switch("exampleMaster",
        vswitch_name=name,
        cidr_block="192.168.1.0/24",
        vpc_id=example_network.id,
        zone_id=master_zone)
    example_slave = alicloud.vpc.Switch("exampleSlave",
        vswitch_name=name,
        cidr_block="192.168.2.0/24",
        vpc_id=example_network.id,
        zone_id=slave_zone)
    example_instance = alicloud.cen.Instance("exampleInstance",
        cen_instance_name=name,
        protection_level="REDUCED")
    example_transit_router = alicloud.cen.TransitRouter("exampleTransitRouter",
        transit_router_name=name,
        cen_id=example_instance.id)
    example_transit_router_vpc_attachment = alicloud.cen.TransitRouterVpcAttachment("exampleTransitRouterVpcAttachment",
        cen_id=example_instance.id,
        transit_router_id=example_transit_router.transit_router_id,
        vpc_id=example_network.id,
        zone_mappings=[
            alicloud.cen.TransitRouterVpcAttachmentZoneMappingArgs(
                zone_id=master_zone,
                vswitch_id=example_master.id,
            ),
            alicloud.cen.TransitRouterVpcAttachmentZoneMappingArgs(
                zone_id=slave_zone,
                vswitch_id=example_slave.id,
            ),
        ],
        transit_router_attachment_name=name,
        transit_router_attachment_description=name)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const default = alicloud.cen.getTransitRouterAvailableResources({});
    const masterZone = _default.then(_default => _default.resources?.[0]?.masterZones?.[0]);
    const slaveZone = _default.then(_default => _default.resources?.[0]?.slaveZones?.[1]);
    const exampleNetwork = new alicloud.vpc.Network("exampleNetwork", {
        vpcName: name,
        cidrBlock: "192.168.0.0/16",
    });
    const exampleMaster = new alicloud.vpc.Switch("exampleMaster", {
        vswitchName: name,
        cidrBlock: "192.168.1.0/24",
        vpcId: exampleNetwork.id,
        zoneId: masterZone,
    });
    const exampleSlave = new alicloud.vpc.Switch("exampleSlave", {
        vswitchName: name,
        cidrBlock: "192.168.2.0/24",
        vpcId: exampleNetwork.id,
        zoneId: slaveZone,
    });
    const exampleInstance = new alicloud.cen.Instance("exampleInstance", {
        cenInstanceName: name,
        protectionLevel: "REDUCED",
    });
    const exampleTransitRouter = new alicloud.cen.TransitRouter("exampleTransitRouter", {
        transitRouterName: name,
        cenId: exampleInstance.id,
    });
    const exampleTransitRouterVpcAttachment = new alicloud.cen.TransitRouterVpcAttachment("exampleTransitRouterVpcAttachment", {
        cenId: exampleInstance.id,
        transitRouterId: exampleTransitRouter.transitRouterId,
        vpcId: exampleNetwork.id,
        zoneMappings: [
            {
                zoneId: masterZone,
                vswitchId: exampleMaster.id,
            },
            {
                zoneId: slaveZone,
                vswitchId: exampleSlave.id,
            },
        ],
        transitRouterAttachmentName: name,
        transitRouterAttachmentDescription: name,
    });
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      exampleNetwork:
        type: alicloud:vpc:Network
        properties:
          vpcName: ${name}
          cidrBlock: 192.168.0.0/16
      exampleMaster:
        type: alicloud:vpc:Switch
        properties:
          vswitchName: ${name}
          cidrBlock: 192.168.1.0/24
          vpcId: ${exampleNetwork.id}
          zoneId: ${masterZone}
      exampleSlave:
        type: alicloud:vpc:Switch
        properties:
          vswitchName: ${name}
          cidrBlock: 192.168.2.0/24
          vpcId: ${exampleNetwork.id}
          zoneId: ${slaveZone}
      exampleInstance:
        type: alicloud:cen:Instance
        properties:
          cenInstanceName: ${name}
          protectionLevel: REDUCED
      exampleTransitRouter:
        type: alicloud:cen:TransitRouter
        properties:
          transitRouterName: ${name}
          cenId: ${exampleInstance.id}
      exampleTransitRouterVpcAttachment:
        type: alicloud:cen:TransitRouterVpcAttachment
        properties:
          cenId: ${exampleInstance.id}
          transitRouterId: ${exampleTransitRouter.transitRouterId}
          vpcId: ${exampleNetwork.id}
          zoneMappings:
            - zoneId: ${masterZone}
              vswitchId: ${exampleMaster.id}
            - zoneId: ${slaveZone}
              vswitchId: ${exampleSlave.id}
          transitRouterAttachmentName: ${name}
          transitRouterAttachmentDescription: ${name}
    variables:
      default:
        fn::invoke:
          Function: alicloud:cen:getTransitRouterAvailableResources
          Arguments: {}
      masterZone: ${default.resources[0].masterZones[0]}
      slaveZone: ${default.resources[0].slaveZones[1]}
    

    Create TransitRouterVpcAttachment Resource

    new TransitRouterVpcAttachment(name: string, args: TransitRouterVpcAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def TransitRouterVpcAttachment(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   auto_publish_route_enabled: Optional[bool] = 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.TransitRouterVpcAttachmentZoneMapping>

    The list of zone mapping of the VPC. See zone_mappings below. 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

    AutoPublishRouteEnabled bool
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    DryRun bool
    The dry run.
    PaymentType string
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    ResourceType string
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    RouteTableAssociationEnabled bool
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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. See zone_mappings below. 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

    AutoPublishRouteEnabled bool
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    DryRun bool
    The dry run.
    PaymentType string
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    ResourceType string
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    RouteTableAssociationEnabled bool
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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<TransitRouterVpcAttachmentZoneMapping>

    The list of zone mapping of the VPC. See zone_mappings below. 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

    autoPublishRouteEnabled Boolean
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    dryRun Boolean
    The dry run.
    paymentType String
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    resourceType String
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    routeTableAssociationEnabled Boolean
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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 TransitRouterVpcAttachmentZoneMapping[]

    The list of zone mapping of the VPC. See zone_mappings below. 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

    autoPublishRouteEnabled boolean
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    dryRun boolean
    The dry run.
    paymentType string
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    resourceType string
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    routeTableAssociationEnabled boolean
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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. See zone_mappings below. 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

    auto_publish_route_enabled bool
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    dry_run bool
    The dry run.
    payment_type str
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    resource_type str
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    route_table_association_enabled bool
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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. See zone_mappings below. 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

    autoPublishRouteEnabled Boolean
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    dryRun Boolean
    The dry run.
    paymentType String
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    resourceType String
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    routeTableAssociationEnabled Boolean
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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 the 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 the 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 the 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 the 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 the 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 the 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,
            auto_publish_route_enabled: Optional[bool] = 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:
    AutoPublishRouteEnabled bool
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    CenId string
    The ID of the CEN.
    DryRun bool
    The dry run.
    PaymentType string
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    ResourceType string
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    RouteTableAssociationEnabled bool
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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 the 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.TransitRouterVpcAttachmentZoneMapping>

    The list of zone mapping of the VPC. See zone_mappings below. 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

    AutoPublishRouteEnabled bool
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    CenId string
    The ID of the CEN.
    DryRun bool
    The dry run.
    PaymentType string
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    ResourceType string
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    RouteTableAssociationEnabled bool
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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 the 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. See zone_mappings below. 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

    autoPublishRouteEnabled Boolean
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    cenId String
    The ID of the CEN.
    dryRun Boolean
    The dry run.
    paymentType String
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    resourceType String
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    routeTableAssociationEnabled Boolean
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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 the 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<TransitRouterVpcAttachmentZoneMapping>

    The list of zone mapping of the VPC. See zone_mappings below. 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

    autoPublishRouteEnabled boolean
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    cenId string
    The ID of the CEN.
    dryRun boolean
    The dry run.
    paymentType string
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    resourceType string
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    routeTableAssociationEnabled boolean
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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 the 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 TransitRouterVpcAttachmentZoneMapping[]

    The list of zone mapping of the VPC. See zone_mappings below. 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

    auto_publish_route_enabled bool
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    cen_id str
    The ID of the CEN.
    dry_run bool
    The dry run.
    payment_type str
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    resource_type str
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    route_table_association_enabled bool
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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 the 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. See zone_mappings below. 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

    autoPublishRouteEnabled Boolean
    Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:
    cenId String
    The ID of the CEN.
    dryRun Boolean
    The dry run.
    paymentType String
    The payment type of the resource. Default value: PayAsYouGo. Valid values: PayAsYouGo.
    resourceType String
    The resource type of the transit router vpc attachment. Default value: VPC. Valid values: VPC.
    routeTableAssociationEnabled Boolean
    Whether to enabled route table association. NOTE: "Field route_table_association_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTableAssociation instead, how to use alicloud_cen_transit_router_route_table_association."

    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
    Whether to enabled route table propagation. NOTE: "Field route_table_propagation_enabled has been deprecated from provider version 1.192.0. Please use the resource alicloud.cen.TransitRouterRouteTablePropagation instead, how to use alicloud_cen_transit_router_route_table_propagation."

    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 the 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. See zone_mappings below. 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, TransitRouterVpcAttachmentZoneMappingArgs

    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 Transit Router VPC Attachment can be imported using the id, e.g.

     $ pulumi import alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment example <cen_id>:<transit_router_attachment_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.49.0 published on Sunday, Feb 4, 2024 by Pulumi