github.com/nevins-b/terraform@v0.3.8-0.20170215184714-bbae22007d5a/website/source/docs/providers/aws/r/dms_replication_task.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_dms_replication_task"
     4  sidebar_current: "docs-aws-resource-dms-replication-task"
     5  description: |-
     6    Provides a DMS (Data Migration Service) replication task resource.
     7  ---
     8  
     9  # aws\_dms\_replication\_task
    10  
    11  Provides a DMS (Data Migration Service) replication task resource. DMS replication tasks can be created, updated, deleted, and imported.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  # Create a new replication task
    17  resource "aws_dms_replication_task" "test" {
    18    cdc_start_time = 1484346880
    19    migration_type = "full-load"
    20    replication_instance_arn = "${aws_dms_replication_instance.test-dms-replication-instance-tf.replication_instance_arn}"
    21    replication_task_id = "test-dms-replication-task-tf"
    22    replication_task_settings = "..."
    23    source_endpoint_arn = "${aws_dms_endpoint.test-dms-source-endpoint-tf.endpoint_arn}"
    24    table_mappings = "{\"rules\":[{\"rule-type\":\"selection\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"object-locator\":{\"schema-name\":\"%\",\"table-name\":\"%\"},\"rule-action\":\"include\"}]}"
    25    tags {
    26      Name = "test"
    27    }
    28    target_endpoint_arn = "${aws_dms_endpoint.test-dms-target-endpoint-tf.endpoint_arn}"
    29  }
    30  ```
    31  
    32  ## Argument Reference
    33  
    34  The following arguments are supported:
    35  
    36  * `cdc_start_time` - (Optional) The Unix timestamp integer for the start of the Change Data Capture (CDC) operation.
    37  * `migration_type` - (Required) The migration type. Can be one of `full-load | cdc | full-load-and-cdc`.
    38  * `replication_instance_arn` - (Required) The Amazon Resource Name (ARN) of the replication instance.
    39  * `replication_task_id` - (Required) The replication task identifier.
    40  
    41      - Must contain from 1 to 255 alphanumeric characters or hyphens.
    42      - First character must be a letter.
    43      - Cannot end with a hyphen.
    44      - Cannot contain two consecutive hyphens.
    45  
    46  * `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](http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.html).
    47  * `source_endpoint_arn` - (Required) The Amazon Resource Name (ARN) string that uniquely identifies the source endpoint.
    48  * `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](http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.html)
    49  * `tags` - (Optional) A mapping of tags to assign to the resource.
    50  * `target_endpoint_arn` - (Required) The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.
    51  
    52  ## Attributes Reference
    53  
    54  The following attributes are exported:
    55  
    56  * `replication_task_arn` - The Amazon Resource Name (ARN) for the replication task.
    57  
    58  ## Import
    59  
    60  Replication tasks can be imported using the `replication_task_id`, e.g.
    61  
    62  ```
    63  $ terraform import aws_dms_replication_task.test test-dms-replication-task-tf
    64  ```