Skip to content

Instantly share code, notes, and snippets.

@chewmanfoo
Created December 19, 2019 18:20
Show Gist options
  • Save chewmanfoo/8906145abdb1999140e6dc0e40670f6f to your computer and use it in GitHub Desktop.
Save chewmanfoo/8906145abdb1999140e6dc0e40670f6f to your computer and use it in GitHub Desktop.
replicastion_task.tf
variable "task_name_suffixes" {
default = {
"0" = "lob-tables-01"
"1" = "datashack-tables-01"
"2" = "wexnet-tables-01"
"3" = "wexnet-tables-02"
"4" = "arch-tables-01"
"5" = "tiger-tables-01"
"6" = "tiger-tables-02"
"7" = "wwex-tables-01"
"8" = "wwex-tables-02"
"9" = "s3f-tables-01"
"10" = "test-01"
}
}
# Create a new replication tasks
resource "aws_dms_replication_task" "task1" {
count = 10
task_name_suffix = "${lookup(var.task_name_suffixes, count.index)}"
awsenv = "${lookup(var.awsenvlows, local.env)}"
rsenv = "${lookup(var.rsenvs, local.env)}"
task_name = "${format("wwex%s-wwex%s-%s",rsenv,awsenv,task_name_suffix)}"
# cdc_start_time = 1484346880
migration_type = "full-load-and-cdc"
replication_instance_arn = "${aws_dms_replication_instance.replication_instance_limited_lob.replication_instance_arn}"
replication_task_id = "${task_name}"
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment