Provides a DMS Serverless replication config resource.
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"
}
}
This resource supports the following arguments:
compute_config
- (Required) Configuration block for provisioning an DMS Serverless replication.start_replication
- (Optional) Whether to run or stop the serverless replication, default is false.replication_config_identifier
- (Required) Unique identifier that you want to use to create the config.replication_type
- (Required) The migration type. Can be one of full-load | cdc | full-load-and-cdc
.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 Datatarget_endpoint_arn
- (Required) The Amazon Resource Name (ARN) string that uniquely identifies the target endpoint.replication_settings
- (Optional) An escaped JSON string that are used to provision this replication configuration. For example, Change processing tuning settingsresource_identifier
- (Optional) Unique value or name that you set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource. For more information, see Fine-grained access control using resource names and tagssupplemental_settings
- (Optional) JSON settings for specifying supplemental data. For more information see Specifying supplemental data for task settingstags
- (Optional) A map of tags to assign to the resource. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.compute_config
block support the following:
availability_zone
- (Optional) The Availability Zone where the DMS Serverless replication using this configuration will run. The default value is a random.dns_name_servers
- (Optional) A list of custom DNS name servers supported for the DMS Serverless replication to access your source or target database.kms_key_id
- (Optional) An Key Management Service (KMS) key Amazon Resource Name (ARN) that is used to encrypt the data during DMS Serverless replication. If you don't specify a value for the KmsKeyId parameter, DMS uses your default encryption key.max_capacity_units
- (Required) Specifies the maximum value of the DMS capacity units (DCUs) for which a given DMS Serverless replication can be provisioned. A single DCU is 2GB of RAM, with 2 DCUs as the minimum value allowed. The list of valid DCU values includes 2, 4, 8, 16, 32, 64, 128, 192, 256, and 384.min_capacity_units
- (Optional) Specifies the minimum value of the DMS capacity units (DCUs) for which a given DMS Serverless replication can be provisioned. The list of valid DCU values includes 2, 4, 8, 16, 32, 64, 128, 192, 256, and 384. If this value isn't set DMS scans the current activity of available source tables to identify an optimum setting for this parameter.multi_az
- (Optional) Specifies if the replication instance is a multi-az deployment. You cannot set the availability_zone
parameter if the multi_az
parameter is set to true
.preferred_maintenance_window
- (Optional) The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
ddd:hh24:mi-ddd:hh24:mi
mon, tue, wed, thu, fri, sat, sun
replication_subnet_group_id
- (Optional) Specifies a subnet group identifier to associate with the DMS Serverless replication.
vpc_security_group_ids
- (Optional) Specifies the virtual private cloud (VPC) security group to use with the DMS Serverless replication. The VPC security group must work with the VPC containing the replication.This resource exports the following attributes in addition to the arguments above:
arn
- The Amazon Resource Name (ARN) for the serverless replication config.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.create
- (Default 60m
)update
- (Default 60m
)delete
- (Default 60m
)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