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:
- Cen
Id string The ID of the CEN.
- Vpc
Id string The ID of the VPC.
- Zone
Mappings List<Pulumi.Ali Cloud. Cen. Inputs. Transit Router Vpc Attachment Zone Mapping Args> 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 string The payment type of the resource. Valid values:
PayAsYouGo
.- Resource
Type string The resource type of transit router vpc attachment. Valid value
VPC
. Default value isVPC
.- Route
Table boolAssociation Enabled 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 boolPropagation Enabled 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.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Transit
Router stringAttachment Description The description of the transit router vbr attachment.
- Transit
Router stringAttachment Name The name of the transit router vbr attachment.
- Transit
Router stringId The ID of the transit router.
- Vpc
Owner stringId The owner id of vpc.
- Cen
Id string The ID of the CEN.
- Vpc
Id string The ID of the VPC.
- Zone
Mappings []TransitRouter Vpc Attachment Zone Mapping Args 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 string The payment type of the resource. Valid values:
PayAsYouGo
.- Resource
Type string The resource type of transit router vpc attachment. Valid value
VPC
. Default value isVPC
.- Route
Table boolAssociation Enabled 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 boolPropagation Enabled 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.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Transit
Router stringAttachment Description The description of the transit router vbr attachment.
- Transit
Router stringAttachment Name The name of the transit router vbr attachment.
- Transit
Router stringId The ID of the transit router.
- Vpc
Owner stringId The owner id of vpc.
- cen
Id String The ID of the CEN.
- vpc
Id String The ID of the VPC.
- zone
Mappings List<TransitRouter Vpc Attachment Zone Mapping Args> 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 Boolean The dry run.
- payment
Type String The payment type of the resource. Valid values:
PayAsYouGo
.- resource
Type String The resource type of transit router vpc attachment. Valid value
VPC
. Default value isVPC
.- route
Table BooleanAssociation Enabled 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 BooleanPropagation Enabled 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.
- Map<String,Object>
A mapping of tags to assign to the resource.
- transit
Router StringAttachment Description The description of the transit router vbr attachment.
- transit
Router StringAttachment Name The name of the transit router vbr attachment.
- transit
Router StringId The ID of the transit router.
- vpc
Owner StringId The owner id of vpc.
- cen
Id string The ID of the CEN.
- vpc
Id string The ID of the VPC.
- zone
Mappings TransitRouter Vpc Attachment Zone Mapping Args[] 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 boolean The dry run.
- payment
Type string The payment type of the resource. Valid values:
PayAsYouGo
.- resource
Type string The resource type of transit router vpc attachment. Valid value
VPC
. Default value isVPC
.- route
Table booleanAssociation Enabled 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 booleanPropagation Enabled 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.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- transit
Router stringAttachment Description The description of the transit router vbr attachment.
- transit
Router stringAttachment Name The name of the transit router vbr attachment.
- transit
Router stringId The ID of the transit router.
- vpc
Owner stringId The owner id of vpc.
- cen_
id str The ID of the CEN.
- vpc_
id str The ID of the VPC.
- zone_
mappings Sequence[TransitRouter Vpc Attachment Zone Mapping Args] 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 isVPC
.- route_
table_ boolassociation_ enabled 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_ boolpropagation_ enabled 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.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- transit_
router_ strattachment_ description The description of the transit router vbr attachment.
- transit_
router_ strattachment_ name The name of the transit router vbr attachment.
- transit_
router_ strid The ID of the transit router.
- vpc_
owner_ strid The owner id of vpc.
- cen
Id String The ID of the CEN.
- vpc
Id String The ID of the VPC.
- zone
Mappings 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
- dry
Run Boolean The dry run.
- payment
Type String The payment type of the resource. Valid values:
PayAsYouGo
.- resource
Type String The resource type of transit router vpc attachment. Valid value
VPC
. Default value isVPC
.- route
Table BooleanAssociation Enabled 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 BooleanPropagation Enabled 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.
- Map<Any>
A mapping of tags to assign to the resource.
- transit
Router StringAttachment Description The description of the transit router vbr attachment.
- transit
Router StringAttachment Name The name of the transit router vbr attachment.
- transit
Router StringId The ID of the transit router.
- vpc
Owner StringId 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.
- Transit
Router stringAttachment Id 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.
- Transit
Router stringAttachment Id 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.
- transit
Router StringAttachment Id 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.
- transit
Router stringAttachment Id 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_ strattachment_ id 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.
- transit
Router StringAttachment Id 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.
- Cen
Id string The ID of the CEN.
- Dry
Run bool The dry run.
- Payment
Type string The payment type of the resource. Valid values:
PayAsYouGo
.- Resource
Type string The resource type of transit router vpc attachment. Valid value
VPC
. Default value isVPC
.- Route
Table boolAssociation Enabled 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 boolPropagation Enabled 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.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Transit
Router stringAttachment Description The description of the transit router vbr attachment.
- Transit
Router stringAttachment Id The ID of transit router attachment.
- Transit
Router stringAttachment Name The name of the transit router vbr attachment.
- Transit
Router stringId The ID of the transit router.
- Vpc
Id string The ID of the VPC.
- Vpc
Owner stringId The owner id of vpc.
- Zone
Mappings List<Pulumi.Ali Cloud. Cen. Inputs. Transit Router Vpc Attachment Zone Mapping Args> 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 string The ID of the CEN.
- Dry
Run bool The dry run.
- Payment
Type string The payment type of the resource. Valid values:
PayAsYouGo
.- Resource
Type string The resource type of transit router vpc attachment. Valid value
VPC
. Default value isVPC
.- Route
Table boolAssociation Enabled 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 boolPropagation Enabled 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.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Transit
Router stringAttachment Description The description of the transit router vbr attachment.
- Transit
Router stringAttachment Id The ID of transit router attachment.
- Transit
Router stringAttachment Name The name of the transit router vbr attachment.
- Transit
Router stringId The ID of the transit router.
- Vpc
Id string The ID of the VPC.
- Vpc
Owner stringId The owner id of vpc.
- Zone
Mappings []TransitRouter Vpc Attachment Zone Mapping Args 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 String The ID of the CEN.
- dry
Run Boolean The dry run.
- payment
Type String The payment type of the resource. Valid values:
PayAsYouGo
.- resource
Type String The resource type of transit router vpc attachment. Valid value
VPC
. Default value isVPC
.- route
Table BooleanAssociation Enabled 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 BooleanPropagation Enabled 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.
- Map<String,Object>
A mapping of tags to assign to the resource.
- transit
Router StringAttachment Description The description of the transit router vbr attachment.
- transit
Router StringAttachment Id The ID of transit router attachment.
- transit
Router StringAttachment Name The name of the transit router vbr attachment.
- transit
Router StringId The ID of the transit router.
- vpc
Id String The ID of the VPC.
- vpc
Owner StringId The owner id of vpc.
- zone
Mappings List<TransitRouter Vpc Attachment Zone Mapping Args> 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 string The ID of the CEN.
- dry
Run boolean The dry run.
- payment
Type string The payment type of the resource. Valid values:
PayAsYouGo
.- resource
Type string The resource type of transit router vpc attachment. Valid value
VPC
. Default value isVPC
.- route
Table booleanAssociation Enabled 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 booleanPropagation Enabled 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.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- transit
Router stringAttachment Description The description of the transit router vbr attachment.
- transit
Router stringAttachment Id The ID of transit router attachment.
- transit
Router stringAttachment Name The name of the transit router vbr attachment.
- transit
Router stringId The ID of the transit router.
- vpc
Id string The ID of the VPC.
- vpc
Owner stringId The owner id of vpc.
- zone
Mappings TransitRouter Vpc Attachment Zone Mapping Args[] 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 isVPC
.- route_
table_ boolassociation_ enabled 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_ boolpropagation_ enabled 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.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- transit_
router_ strattachment_ description The description of the transit router vbr attachment.
- transit_
router_ strattachment_ id The ID of transit router attachment.
- transit_
router_ strattachment_ name The name of the transit router vbr attachment.
- transit_
router_ strid The ID of the transit router.
- vpc_
id str The ID of the VPC.
- vpc_
owner_ strid The owner id of vpc.
- zone_
mappings Sequence[TransitRouter Vpc Attachment Zone Mapping Args] 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 String The ID of the CEN.
- dry
Run Boolean The dry run.
- payment
Type String The payment type of the resource. Valid values:
PayAsYouGo
.- resource
Type String The resource type of transit router vpc attachment. Valid value
VPC
. Default value isVPC
.- route
Table BooleanAssociation Enabled 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 BooleanPropagation Enabled 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.
- Map<Any>
A mapping of tags to assign to the resource.
- transit
Router StringAttachment Description The description of the transit router vbr attachment.
- transit
Router StringAttachment Id The ID of transit router attachment.
- transit
Router StringAttachment Name The name of the transit router vbr attachment.
- transit
Router StringId The ID of the transit router.
- vpc
Id String The ID of the VPC.
- vpc
Owner StringId The owner id of vpc.
- zone
Mappings 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
- vswitch_
id str The VSwitch id of attachment.
- zone_
id str 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.