TransitRouterVpcAttachmentArgs

data class TransitRouterVpcAttachmentArgs(val autoPublishRouteEnabled: Output<Boolean>? = null, val cenId: Output<String>? = null, val dryRun: Output<Boolean>? = null, val paymentType: Output<String>? = null, val resourceType: Output<String>? = null, val routeTableAssociationEnabled: Output<Boolean>? = null, val routeTablePropagationEnabled: Output<Boolean>? = null, val tags: Output<Map<String, Any>>? = null, val transitRouterAttachmentDescription: Output<String>? = null, val transitRouterAttachmentName: Output<String>? = null, val transitRouterId: Output<String>? = null, val vpcId: Output<String>? = null, val vpcOwnerId: Output<String>? = null, val zoneMappings: Output<List<TransitRouterVpcAttachmentZoneMappingArgs>>? = null) : ConvertibleToJava<TransitRouterVpcAttachmentArgs>

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

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

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

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

Constructors

Link copied to clipboard
fun TransitRouterVpcAttachmentArgs(autoPublishRouteEnabled: Output<Boolean>? = null, cenId: Output<String>? = null, dryRun: Output<Boolean>? = null, paymentType: Output<String>? = null, resourceType: Output<String>? = null, routeTableAssociationEnabled: Output<Boolean>? = null, routeTablePropagationEnabled: Output<Boolean>? = null, tags: Output<Map<String, Any>>? = null, transitRouterAttachmentDescription: Output<String>? = null, transitRouterAttachmentName: Output<String>? = null, transitRouterId: Output<String>? = null, vpcId: Output<String>? = null, vpcOwnerId: Output<String>? = null, zoneMappings: Output<List<TransitRouterVpcAttachmentZoneMappingArgs>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): TransitRouterVpcAttachmentArgs

Properties

Link copied to clipboard
val autoPublishRouteEnabled: Output<Boolean>? = null

Whether the transit router is automatically published to the VPC instance. Default value: false. Valid values:

Link copied to clipboard
val cenId: Output<String>? = null

The ID of the CEN.

Link copied to clipboard
val dryRun: Output<Boolean>? = null

The dry run.

Link copied to clipboard
val paymentType: Output<String>? = null

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

Link copied to clipboard
val resourceType: Output<String>? = null

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

Link copied to clipboard

Whether to enabled route table association. The system default value is true. 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."

Link copied to clipboard

Whether to enabled route table propagation. The system default value is true. 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."

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard

The description of the transit router vbr attachment.

Link copied to clipboard
val transitRouterAttachmentName: Output<String>? = null

The name of the transit router vbr attachment.

Link copied to clipboard
val transitRouterId: Output<String>? = null

The ID of the transit router.

Link copied to clipboard
val vpcId: Output<String>? = null

The ID of the VPC.

Link copied to clipboard
val vpcOwnerId: Output<String>? = null

The owner id of vpc.

Link copied to clipboard

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