alicloud_dts_synchronization_instance
更新时间:
复制 MD 格式
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
terraform {
required_providers {
alicloud = {
source = "aliyun/alicloud"
}
}
}
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"
}
Need more examples? VIEW MORE EXAMPLES
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. Whenpayment_typeisSubscription, this parameter is valid and must be passed in.payment_duration- (Optional) The duration of prepaid instance purchase. this parameter is required Whenpayment_typeequalsSubscription.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:xmicro,micro,small,medium,large,xlarge,2xlarge,4xlarge,6xlarge,8xlarge. Note: The parameter is immutable after resource creation. The class is applied only when the instance is created; this resource does not change the class of an existing instance, and an update to this argument is not applied. To upgrade the class of the synchronization instance, changeinstance_classon the correspondingalicloud_dts_synchronization_job, and keep this argument consistent with the resulting class.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 whensource_endpoint_engine_nameequalsdrds.auto_pay- (Optional, String, Computed) Whether to automatically renew the instance when it expires. Valid values:true,false. This argument only takes effect whenpayment_typeisSubscription; forPayAsYouGoinstances it is ignored and not set by the provider. Whenpayment_typeisSubscription, the provider reads the actual renewal status from BSS on every refresh, including refreshes of instances whose configuration does not setauto_pay, so the RAM user needsbss:DescribeInstances; if that lookup fails, the resource read fails. Setting it totrueswitches the instance toAutoRenewaland, when an existing instance is updated, requirespayment_durationandpayment_duration_unitto define the renewal period. In this casepayment_durationmust be1,2,3,6, or12, andpayment_duration_unitmust beMonthorYear; these values can differ from the purchase duration accepted when the instance is created, where the renewal setting is passed throughAutoPay. Setting it tofalseswitches the instance toManualRenewal, so the instance is retained but is not renewed automatically at expiry. BSS reports three renewal states (AutoRenewal,ManualRenewalandNotRenewal);auto_payis read asfalsefor bothManualRenewalandNotRenewal, so the two states are not distinguishable in the state. The renewal setting is sent to BSS only whenauto_paychanges: because an instance inNotRenewalis already read asfalse, addingauto_pay = "false"to its configuration produces no change and does not trigger an update, so the instance is still released at expiry. To retain such an instance, setauto_pay = "true"first and then back tofalse, or change the renewal setting in the console. The renewal period is applied whenauto_payis set or changed; changing onlypayment_durationorpayment_duration_uniton an existing instance does not update the renewal setting. Changingauto_payon an existing subscription instance updates its auto-renew setting in place. The RAM user must be grantedbss:ModifyPrepaidInstanceAutoRenewto change the setting andbss:DescribeInstancesto read it back. For an existing subscription instance whose configuration already setsauto_pay, the next apply reconciles the instance with the configured value, which can overwrite a renewal setting changed in the console.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>
该文章对您有帮助吗?