diff --git a/deploy/modules/aws/tidb-cluster/local.tf b/deploy/modules/aws/tidb-cluster/local.tf index 7a92d2a75f..0b96c67937 100644 --- a/deploy/modules/aws/tidb-cluster/local.tf +++ b/deploy/modules/aws/tidb-cluster/local.tf @@ -74,6 +74,7 @@ locals { asg_max_size = var.tikv_count + 2 pre_userdata = file("${path.module}/pre_userdata") # additional_userdata = file("userdata.sh") + suspended_processes = ["ReplaceUnhealthy"] }, { name = "${var.cluster_name}-tidb" diff --git a/deploy/modules/aws/tidb-cluster/workers.tf b/deploy/modules/aws/tidb-cluster/workers.tf index 1fab065160..4c02e9cdb8 100644 --- a/deploy/modules/aws/tidb-cluster/workers.tf +++ b/deploy/modules/aws/tidb-cluster/workers.tf @@ -29,6 +29,7 @@ resource "aws_autoscaling_group" "workers" { protect_from_scale_in = false count = local.worker_group_count placement_group = "" # The name of the placement group into which to launch the instances, if any. + suspended_processes = lookup(local.tidb_cluster_worker_groups[count.index], "suspended_processes", []) tags = concat( [