* Add aws dms vendoring * Add aws dms endpoint resource * Add aws dms replication instance resource * Add aws dms replication subnet group resource * Add aws dms replication task resource * Fix aws dms resource go vet errors * Review fixes: Add id validators for all resources. Add validator for endpoint engine_name. * Add aws dms resources to importability list * Review fixes: Add aws dms iam role dependencies to test cases * Review fixes: Adjustments for handling input values * Add aws dms replication subnet group tagging * Fix aws dms subnet group doesn't use standard error for resource not found * Missed update of aws dms vendored version * Add aws dms certificate resource * Update aws dms resources to force new for immutable attributes * Fix tests failing on subnet deletion by adding explicit dependencies. Combine import tests with basic tests to cut down runtime.
3.0 KiB
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| aws | AWS: aws_dms_replication_task | docs-aws-resource-dms-replication-task | Provides a DMS (Data Migration Service) replication task resource. |
aws_dms_replication_task
Provides a DMS (Data Migration Service) replication task resource. DMS replication tasks can be created, updated, deleted, and imported.
Example Usage
# Create a new replication task
resource "aws_dms_replication_task" "test" {
cdc_start_time = 1484346880
migration_type = "full-load"
replication_instance_arn = "${aws_dms_replication_instance.test-dms-replication-instance-tf.replication_instance_arn}"
replication_task_id = "test-dms-replication-task-tf"
replication_task_settings = "..."
source_endpoint_arn = "${aws_dms_endpoint.test-dms-source-endpoint-tf.endpoint_arn}"
table_mappings = "{\"rules\":[{\"rule-type\":\"selection\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"object-locator\":{\"schema-name\":\"%\",\"table-name\":\"%\"},\"rule-action\":\"include\"}]}"
tags {
Name = "test"
}
target_endpoint_arn = "${aws_dms_endpoint.test-dms-target-endpoint-tf.endpoint_arn}"
}
Argument Reference
The following arguments are supported:
-
cdc_start_time- (Optional) The Unix timestamp integer for the start of the Change Data Capture (CDC) operation. -
migration_type- (Required) The migration type. Can be one offull-load | cdc | full-load-and-cdc. -
replication_instance_arn- (Required) The Amazon Resource Name (ARN) of the replication instance. -
replication_task_id- (Required) The replication task identifier.- Must contain from 1 to 255 alphanumeric characters or hyphens.
- First character must be a letter.
- Cannot end with a hyphen.
- Cannot contain two consecutive hyphens.
-
replication_task_settings- (Optional) An escaped JSON string that contains the task settings. For a complete list of task settings, see Task Settings for AWS Database Migration Service Tasks. -
source_endpoint_arn- (Required) The Amazon Resource Name (ARN) string that uniquely identifies the source endpoint. -
table_mappings- (Required) An escaped JSON string that contains the table mappings. For information on table mapping see Using Table Mapping with an AWS Database Migration Service Task to Select and Filter Data -
tags- (Optional) A mapping of tags to assign to the resource. -
target_endpoint_arn- (Required) The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.
Attributes Reference
The following attributes are exported:
replication_task_arn- The Amazon Resource Name (ARN) for the replication task.
Import
Replication tasks can be imported using the replication_task_id, e.g.
$ terraform import aws_dms_replication_task.test test-dms-replication-task-tf