alicloud_dts_synchronization_instance

更新时间:

Provides a DTS Synchronization Instance resource.

For information about DTS Synchronization Instance and how to use it, see What is Synchronization Instance.

-> NOTE: Available since v1.138.0.

Example Usage

Basic Usage


data "alicloud_regions" "default" {
  current = true
}
resource "alicloud_dts_synchronization_instance" "default" {
  payment_type                     = "PayAsYouGo"
  source_endpoint_engine_name      = "MySQL"
  source_endpoint_region           = data.alicloud_regions.default.regions.0.id
  destination_endpoint_engine_name = "MySQL"
  destination_endpoint_region      = data.alicloud_regions.default.regions.0.id
  instance_class                   = "small"
  sync_architecture                = "oneway"
}

Argument Reference

The following arguments are supported:

  • payment_type - (Required, ForceNew) The payment type of the resource. Valid values: Subscription, PayAsYouGo.
  • payment_duration_unit - (Optional) The payment duration unit. Valid values: Month, Year. When payment_type is Subscription, this parameter is valid and must be passed in.
  • payment_duration - (Optional) The duration of prepaid instance purchase. this parameter is required When payment_type equals Subscription.
  • source_endpoint_region - (Required, ForceNew) The region of source instance.
  • source_endpoint_engine_name - (Required, ForceNew) The type of source endpoint engine. Valid values: ADS, DB2, DRDS, DataHub, Greenplum, MSSQL, MySQL, PolarDB, PostgreSQL, Redis, Tablestore, as400, clickhouse, kafka, mongodb, odps, oracle, polardb_o, polardb_pg, tidb. For the correspondence between the supported source and target libraries, see Supported Databases, Synchronization Initialization Types and Synchronization Topologies, Supported Databases and Migration Types.
  • destination_endpoint_region - (Required, ForceNew) The region of destination instance. List of supported regions.
  • destination_endpoint_engine_name - (Required, ForceNew) The type of destination engine. Valid values: ADS, DB2, DRDS, DataHub, Greenplum, MSSQL, MySQL, PolarDB, PostgreSQL, Redis, Tablestore, as400, clickhouse, kafka, mongodb, odps, oracle, polardb_o, polardb_pg, tidb. For the correspondence between the supported source and target libraries, see Supported Databases, Synchronization Initialization Types and Synchronization Topologies, Supported Databases and Migration Types.
  • instance_class - (Optional) The instance class. Valid values: large, medium, micro, small, xlarge, xxlarge. You can only upgrade the configuration, not downgrade the configuration. If you downgrade the instance, you need to submit a ticket.
  • sync_architecture - (Optional) The sync architecture. Valid values: oneway, bidirectional.
  • compute_unit - (Optional) ETL specifications. The unit is the computing unit ComputeUnit (CU), 1CU=1vCPU+4 GB memory. The value range is an integer greater than or equal to 2.
  • database_count - (Optional) The number of private customized RDS instances under PolarDB-X. The default value is 1. This parameter needs to be passed only when source_endpoint_engine_name equals drds.
  • auto_pay - (Optional) Whether to automatically renew when it expires. Valid values: true, false.
  • auto_start - (Optional) Whether to automatically start the task after the purchase completed. Valid values: true, false.
  • quantity - (Optional) The number of instances purchased.

Attributes Reference

The following attributes are exported:

  • id - The resource ID of Synchronization Instance.
  • status - The status.

Import

DTS Synchronization Instance can be imported using the id, e.g.

$ terraform import alicloud_dts_synchronization_instance.example <id>