Resource: aws_dms_replication_config

Provides a DMS Serverless replication config resource.

Example Usage

resource "aws_dms_replication_config" "name" {
  replication_config_identifier = "test-dms-serverless-replication-tf"
  resource_identifier           = "test-dms-serverless-replication-tf"
  replication_type              = "cdc"
  source_endpoint_arn           = aws_dms_endpoint.source.endpoint_arn
  target_endpoint_arn           = aws_dms_endpoint.target.endpoint_arn
  table_mappings                = <<EOF
  {
    "rules":[{"rule-type":"selection","rule-id":"1","rule-name":"1","rule-action":"include","object-locator":{"schema-name":"%%","table-name":"%%"}}]
  }
EOF

  start_replication = true

  compute_config {
    replication_subnet_group_id  = aws_dms_replication_subnet_group.default.replication_subnet_group_id
    max_capacity_units           = "64"
    min_capacity_units           = "2"
    preferred_maintenance_window = "sun:23:45-mon:00:30"
  }
}

Argument Reference

This resource supports the following arguments:

compute_config block support the following:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import replication configs using the arn. For example:

import {
  to = aws_dms_replication_config.example
  id = "arn:aws:dms:us-east-1:123456789012:replication-config:UX6OL6MHMMJKFFOXE3H7LLJCMEKBDUG4ZV7DRSI"
}

Using terraform import, import a replication config using the arn. For example:

% terraform import aws_dms_replication_config.example arn:aws:dms:us-east-1:123456789012:replication-config:UX6OL6MHMMJKFFOXE3H7LLJCMEKBDUG4ZV7DRSI