github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/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  ```hcl
    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  
    26    tags {
    27      Name = "test"
    28    }
    29  
    30    target_endpoint_arn = "${aws_dms_endpoint.test-dms-target-endpoint-tf.endpoint_arn}"
    31  }
    32  ```
    33  
    34  ## Argument Reference
    35  
    36  The following arguments are supported:
    37  
    38  * `cdc_start_time` - (Optional) The Unix timestamp integer for the start of the Change Data Capture (CDC) operation.
    39  * `migration_type` - (Required) The migration type. Can be one of `full-load | cdc | full-load-and-cdc`.
    40  * `replication_instance_arn` - (Required) The Amazon Resource Name (ARN) of the replication instance.
    41  * `replication_task_id` - (Required) The replication task identifier.
    42  
    43      - Must contain from 1 to 255 alphanumeric characters or hyphens.
    44      - First character must be a letter.
    45      - Cannot end with a hyphen.
    46      - Cannot contain two consecutive hyphens.
    47  
    48  * `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).
    49  * `source_endpoint_arn` - (Required) The Amazon Resource Name (ARN) string that uniquely identifies the source endpoint.
    50  * `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)
    51  * `tags` - (Optional) A mapping of tags to assign to the resource.
    52  * `target_endpoint_arn` - (Required) The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.
    53  
    54  ## Attributes Reference
    55  
    56  The following attributes are exported:
    57  
    58  * `replication_task_arn` - The Amazon Resource Name (ARN) for the replication task.
    59  
    60  ## Import
    61  
    62  Replication tasks can be imported using the `replication_task_id`, e.g.
    63  
    64  ```
    65  $ terraform import aws_dms_replication_task.test test-dms-replication-task-tf
    66  ```