alicloud.cen.TransitRouterVpcAttachment
Explore with Pulumi AI
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
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 example = new alicloud.vpc.Network("example", {
vpcName: name,
cidrBlock: "192.168.0.0/16",
});
const exampleMaster = new alicloud.vpc.Switch("example_master", {
vswitchName: name,
cidrBlock: "192.168.1.0/24",
vpcId: example.id,
zoneId: masterZone,
});
const exampleSlave = new alicloud.vpc.Switch("example_slave", {
vswitchName: name,
cidrBlock: "192.168.2.0/24",
vpcId: example.id,
zoneId: slaveZone,
});
const exampleInstance = new alicloud.cen.Instance("example", {
cenInstanceName: name,
protectionLevel: "REDUCED",
});
const exampleTransitRouter = new alicloud.cen.TransitRouter("example", {
transitRouterName: name,
cenId: exampleInstance.id,
});
const exampleTransitRouterVpcAttachment = new alicloud.cen.TransitRouterVpcAttachment("example", {
cenId: exampleInstance.id,
transitRouterId: exampleTransitRouter.transitRouterId,
vpcId: example.id,
zoneMappings: [
{
zoneId: masterZone,
vswitchId: exampleMaster.id,
},
{
zoneId: slaveZone,
vswitchId: exampleSlave.id,
},
],
transitRouterAttachmentName: name,
transitRouterAttachmentDescription: name,
});
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 = alicloud.vpc.Network("example",
vpc_name=name,
cidr_block="192.168.0.0/16")
example_master = alicloud.vpc.Switch("example_master",
vswitch_name=name,
cidr_block="192.168.1.0/24",
vpc_id=example.id,
zone_id=master_zone)
example_slave = alicloud.vpc.Switch("example_slave",
vswitch_name=name,
cidr_block="192.168.2.0/24",
vpc_id=example.id,
zone_id=slave_zone)
example_instance = alicloud.cen.Instance("example",
cen_instance_name=name,
protection_level="REDUCED")
example_transit_router = alicloud.cen.TransitRouter("example",
transit_router_name=name,
cen_id=example_instance.id)
example_transit_router_vpc_attachment = alicloud.cen.TransitRouterVpcAttachment("example",
cen_id=example_instance.id,
transit_router_id=example_transit_router.transit_router_id,
vpc_id=example.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)
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]
example, err := vpc.NewNetwork(ctx, "example", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("192.168.0.0/16"),
})
if err != nil {
return err
}
exampleMaster, err := vpc.NewSwitch(ctx, "example_master", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
CidrBlock: pulumi.String("192.168.1.0/24"),
VpcId: example.ID(),
ZoneId: pulumi.String(masterZone),
})
if err != nil {
return err
}
exampleSlave, err := vpc.NewSwitch(ctx, "example_slave", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
CidrBlock: pulumi.String("192.168.2.0/24"),
VpcId: example.ID(),
ZoneId: pulumi.String(slaveZone),
})
if err != nil {
return err
}
exampleInstance, err := cen.NewInstance(ctx, "example", &cen.InstanceArgs{
CenInstanceName: pulumi.String(name),
ProtectionLevel: pulumi.String("REDUCED"),
})
if err != nil {
return err
}
exampleTransitRouter, err := cen.NewTransitRouter(ctx, "example", &cen.TransitRouterArgs{
TransitRouterName: pulumi.String(name),
CenId: exampleInstance.ID(),
})
if err != nil {
return err
}
_, err = cen.NewTransitRouterVpcAttachment(ctx, "example", &cen.TransitRouterVpcAttachmentArgs{
CenId: exampleInstance.ID(),
TransitRouterId: exampleTransitRouter.TransitRouterId,
VpcId: example.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
})
}
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 example = new AliCloud.Vpc.Network("example", new()
{
VpcName = name,
CidrBlock = "192.168.0.0/16",
});
var exampleMaster = new AliCloud.Vpc.Switch("example_master", new()
{
VswitchName = name,
CidrBlock = "192.168.1.0/24",
VpcId = example.Id,
ZoneId = masterZone,
});
var exampleSlave = new AliCloud.Vpc.Switch("example_slave", new()
{
VswitchName = name,
CidrBlock = "192.168.2.0/24",
VpcId = example.Id,
ZoneId = slaveZone,
});
var exampleInstance = new AliCloud.Cen.Instance("example", new()
{
CenInstanceName = name,
ProtectionLevel = "REDUCED",
});
var exampleTransitRouter = new AliCloud.Cen.TransitRouter("example", new()
{
TransitRouterName = name,
CenId = exampleInstance.Id,
});
var exampleTransitRouterVpcAttachment = new AliCloud.Cen.TransitRouterVpcAttachment("example", new()
{
CenId = exampleInstance.Id,
TransitRouterId = exampleTransitRouter.TransitRouterId,
VpcId = example.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 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 example = new Network("example", 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(example.id())
.zoneId(masterZone)
.build());
var exampleSlave = new Switch("exampleSlave", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("192.168.2.0/24")
.vpcId(example.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(example.id())
.zoneMappings(
TransitRouterVpcAttachmentZoneMappingArgs.builder()
.zoneId(masterZone)
.vswitchId(exampleMaster.id())
.build(),
TransitRouterVpcAttachmentZoneMappingArgs.builder()
.zoneId(slaveZone)
.vswitchId(exampleSlave.id())
.build())
.transitRouterAttachmentName(name)
.transitRouterAttachmentDescription(name)
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
example:
type: alicloud:vpc:Network
properties:
vpcName: ${name}
cidrBlock: 192.168.0.0/16
exampleMaster:
type: alicloud:vpc:Switch
name: example_master
properties:
vswitchName: ${name}
cidrBlock: 192.168.1.0/24
vpcId: ${example.id}
zoneId: ${masterZone}
exampleSlave:
type: alicloud:vpc:Switch
name: example_slave
properties:
vswitchName: ${name}
cidrBlock: 192.168.2.0/24
vpcId: ${example.id}
zoneId: ${slaveZone}
exampleInstance:
type: alicloud:cen:Instance
name: example
properties:
cenInstanceName: ${name}
protectionLevel: REDUCED
exampleTransitRouter:
type: alicloud:cen:TransitRouter
name: example
properties:
transitRouterName: ${name}
cenId: ${exampleInstance.id}
exampleTransitRouterVpcAttachment:
type: alicloud:cen:TransitRouterVpcAttachment
name: example
properties:
cenId: ${exampleInstance.id}
transitRouterId: ${exampleTransitRouter.transitRouterId}
vpcId: ${example.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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TransitRouterVpcAttachment(name: string, args: TransitRouterVpcAttachmentArgs, opts?: CustomResourceOptions);
@overload
def TransitRouterVpcAttachment(resource_name: str,
args: TransitRouterVpcAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TransitRouterVpcAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
vpc_id: Optional[str] = None,
cen_id: Optional[str] = None,
zone_mappings: Optional[Sequence[TransitRouterVpcAttachmentZoneMappingArgs]] = None,
route_table_propagation_enabled: Optional[bool] = None,
resource_type: Optional[str] = None,
route_table_association_enabled: Optional[bool] = None,
auto_publish_route_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,
payment_type: Optional[str] = None,
vpc_owner_id: Optional[str] = None,
dry_run: Optional[bool] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var transitRouterVpcAttachmentResource = new AliCloud.Cen.TransitRouterVpcAttachment("transitRouterVpcAttachmentResource", new()
{
VpcId = "string",
CenId = "string",
ZoneMappings = new[]
{
new AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs
{
VswitchId = "string",
ZoneId = "string",
},
},
ResourceType = "string",
AutoPublishRouteEnabled = false,
Tags =
{
{ "string", "any" },
},
TransitRouterAttachmentDescription = "string",
TransitRouterAttachmentName = "string",
TransitRouterId = "string",
PaymentType = "string",
VpcOwnerId = "string",
DryRun = false,
});
example, err := cen.NewTransitRouterVpcAttachment(ctx, "transitRouterVpcAttachmentResource", &cen.TransitRouterVpcAttachmentArgs{
VpcId: pulumi.String("string"),
CenId: pulumi.String("string"),
ZoneMappings: cen.TransitRouterVpcAttachmentZoneMappingArray{
&cen.TransitRouterVpcAttachmentZoneMappingArgs{
VswitchId: pulumi.String("string"),
ZoneId: pulumi.String("string"),
},
},
ResourceType: pulumi.String("string"),
AutoPublishRouteEnabled: pulumi.Bool(false),
Tags: pulumi.Map{
"string": pulumi.Any("any"),
},
TransitRouterAttachmentDescription: pulumi.String("string"),
TransitRouterAttachmentName: pulumi.String("string"),
TransitRouterId: pulumi.String("string"),
PaymentType: pulumi.String("string"),
VpcOwnerId: pulumi.String("string"),
DryRun: pulumi.Bool(false),
})
var transitRouterVpcAttachmentResource = new TransitRouterVpcAttachment("transitRouterVpcAttachmentResource", TransitRouterVpcAttachmentArgs.builder()
.vpcId("string")
.cenId("string")
.zoneMappings(TransitRouterVpcAttachmentZoneMappingArgs.builder()
.vswitchId("string")
.zoneId("string")
.build())
.resourceType("string")
.autoPublishRouteEnabled(false)
.tags(Map.of("string", "any"))
.transitRouterAttachmentDescription("string")
.transitRouterAttachmentName("string")
.transitRouterId("string")
.paymentType("string")
.vpcOwnerId("string")
.dryRun(false)
.build());
transit_router_vpc_attachment_resource = alicloud.cen.TransitRouterVpcAttachment("transitRouterVpcAttachmentResource",
vpc_id="string",
cen_id="string",
zone_mappings=[alicloud.cen.TransitRouterVpcAttachmentZoneMappingArgs(
vswitch_id="string",
zone_id="string",
)],
resource_type="string",
auto_publish_route_enabled=False,
tags={
"string": "any",
},
transit_router_attachment_description="string",
transit_router_attachment_name="string",
transit_router_id="string",
payment_type="string",
vpc_owner_id="string",
dry_run=False)
const transitRouterVpcAttachmentResource = new alicloud.cen.TransitRouterVpcAttachment("transitRouterVpcAttachmentResource", {
vpcId: "string",
cenId: "string",
zoneMappings: [{
vswitchId: "string",
zoneId: "string",
}],
resourceType: "string",
autoPublishRouteEnabled: false,
tags: {
string: "any",
},
transitRouterAttachmentDescription: "string",
transitRouterAttachmentName: "string",
transitRouterId: "string",
paymentType: "string",
vpcOwnerId: "string",
dryRun: false,
});
type: alicloud:cen:TransitRouterVpcAttachment
properties:
autoPublishRouteEnabled: false
cenId: string
dryRun: false
paymentType: string
resourceType: string
tags:
string: any
transitRouterAttachmentDescription: string
transitRouterAttachmentName: string
transitRouterId: string
vpcId: string
vpcOwnerId: string
zoneMappings:
- vswitchId: string
zoneId: string
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> 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 boolRoute Enabled - Whether the transit router is automatically published to the VPC instance. Default value:
false
. Valid values: - Dry
Run bool - The dry run.
- Payment
Type string - The payment type of the resource. Default value:
PayAsYouGo
. Valid values:PayAsYouGo
. - Resource
Type string - The resource type of the transit router vpc attachment. Default value:
VPC
. Valid values:VPC
. - Route
Table boolAssociation Enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - Route
Table boolPropagation Enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - 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. 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 boolRoute Enabled - Whether the transit router is automatically published to the VPC instance. Default value:
false
. Valid values: - Dry
Run bool - The dry run.
- Payment
Type string - The payment type of the resource. Default value:
PayAsYouGo
. Valid values:PayAsYouGo
. - Resource
Type string - The resource type of the transit router vpc attachment. Default value:
VPC
. Valid values:VPC
. - Route
Table boolAssociation Enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - Route
Table boolPropagation Enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - 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> 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 BooleanRoute Enabled - Whether the transit router is automatically published to the VPC instance. Default value:
false
. Valid values: - dry
Run Boolean - The dry run.
- payment
Type String - The payment type of the resource. Default value:
PayAsYouGo
. Valid values:PayAsYouGo
. - resource
Type String - The resource type of the transit router vpc attachment. Default value:
VPC
. Valid values:VPC
. - route
Table BooleanAssociation Enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - route
Table BooleanPropagation Enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - 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[] 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 booleanRoute Enabled - Whether the transit router is automatically published to the VPC instance. Default value:
false
. Valid values: - dry
Run boolean - The dry run.
- payment
Type string - The payment type of the resource. Default value:
PayAsYouGo
. Valid values:PayAsYouGo
. - resource
Type string - The resource type of the transit router vpc attachment. Default value:
VPC
. Valid values:VPC
. - route
Table booleanAssociation Enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - route
Table booleanPropagation Enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - {[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. 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_ boolroute_ enabled - 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_ boolassociation_ enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - route_
table_ boolpropagation_ enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - 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. 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 BooleanRoute Enabled - Whether the transit router is automatically published to the VPC instance. Default value:
false
. Valid values: - dry
Run Boolean - The dry run.
- payment
Type String - The payment type of the resource. Default value:
PayAsYouGo
. Valid values:PayAsYouGo
. - resource
Type String - The resource type of the transit router vpc attachment. Default value:
VPC
. Valid values:VPC
. - route
Table BooleanAssociation Enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - route
Table BooleanPropagation Enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - 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 the 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 the 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 the 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 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_ strattachment_ id - 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.
- transit
Router StringAttachment Id - 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.
- Auto
Publish boolRoute Enabled - Whether the transit router is automatically published to the VPC instance. Default value:
false
. Valid values: - Cen
Id string - The ID of the CEN.
- Dry
Run bool - The dry run.
- Payment
Type string - The payment type of the resource. Default value:
PayAsYouGo
. Valid values:PayAsYouGo
. - Resource
Type string - The resource type of the transit router vpc attachment. Default value:
VPC
. Valid values:VPC
. - Route
Table boolAssociation Enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - Route
Table boolPropagation Enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - 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 the 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> 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 boolRoute Enabled - Whether the transit router is automatically published to the VPC instance. Default value:
false
. Valid values: - Cen
Id string - The ID of the CEN.
- Dry
Run bool - The dry run.
- Payment
Type string - The payment type of the resource. Default value:
PayAsYouGo
. Valid values:PayAsYouGo
. - Resource
Type string - The resource type of the transit router vpc attachment. Default value:
VPC
. Valid values:VPC
. - Route
Table boolAssociation Enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - Route
Table boolPropagation Enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - 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 the 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. 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 BooleanRoute Enabled - Whether the transit router is automatically published to the VPC instance. Default value:
false
. Valid values: - cen
Id String - The ID of the CEN.
- dry
Run Boolean - The dry run.
- payment
Type String - The payment type of the resource. Default value:
PayAsYouGo
. Valid values:PayAsYouGo
. - resource
Type String - The resource type of the transit router vpc attachment. Default value:
VPC
. Valid values:VPC
. - route
Table BooleanAssociation Enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - route
Table BooleanPropagation Enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - 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 the 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> 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 booleanRoute Enabled - Whether the transit router is automatically published to the VPC instance. Default value:
false
. Valid values: - cen
Id string - The ID of the CEN.
- dry
Run boolean - The dry run.
- payment
Type string - The payment type of the resource. Default value:
PayAsYouGo
. Valid values:PayAsYouGo
. - resource
Type string - The resource type of the transit router vpc attachment. Default value:
VPC
. Valid values:VPC
. - route
Table booleanAssociation Enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - route
Table booleanPropagation Enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - 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 the 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[] 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_ boolroute_ enabled - 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_ boolassociation_ enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - route_
table_ boolpropagation_ enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - 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 the 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. 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 BooleanRoute Enabled - Whether the transit router is automatically published to the VPC instance. Default value:
false
. Valid values: - cen
Id String - The ID of the CEN.
- dry
Run Boolean - The dry run.
- payment
Type String - The payment type of the resource. Default value:
PayAsYouGo
. Valid values:PayAsYouGo
. - resource
Type String - The resource type of the transit router vpc attachment. Default value:
VPC
. Valid values:VPC
. - route
Table BooleanAssociation Enabled - Whether to enabled route table association. NOTE: "Field
route_table_association_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTableAssociation
instead, how to use alicloud_cen_transit_router_route_table_association." - route
Table BooleanPropagation Enabled - Whether to enabled route table propagation. NOTE: "Field
route_table_propagation_enabled
has been deprecated from provider version 1.192.0. Please use the resourcealicloud.cen.TransitRouterRouteTablePropagation
instead, how to use alicloud_cen_transit_router_route_table_propagation." - 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 the 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. 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
- vswitch_
id str - The VSwitch id of attachment.
- zone_
id str - 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>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.