From b81a15ad415c357fa5639203ad719347b9027238 Mon Sep 17 00:00:00 2001 From: rverma-nikiai <38323616+rverma-nikiai@users.noreply.github.com> Date: Thu, 11 Apr 2019 18:45:07 +0530 Subject: [PATCH] Add support for placement group in launch template (#332) * Update to 1.12 * Update workers_launch_template.tf * Update local.tf * Update CHANGELOG.md * Update workers.tf * Update workers.tf --- local.tf | 1 + workers_launch_template.tf | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/local.tf b/local.tf index 9d48858..5970d74 100644 --- a/local.tf +++ b/local.tf @@ -82,6 +82,7 @@ locals { suspended_processes = "" # A comma delimited string of processes to to suspend. i.e. AZRebalance,HealthCheck,ReplaceUnhealthy target_group_arns = "" # A comma delimited list of ALB target group ARNs to be associated to the ASG enabled_metrics = "" # A comma delimited list of metrics to be collected i.e. GroupMinSize,GroupMaxSize,GroupDesiredCapacity + placement_group = "" # The name of the placement group into which to launch the instances, if any. } workers_group_launch_template_defaults = "${merge(local.workers_group_launch_template_defaults_defaults, var.workers_group_launch_template_defaults)}" diff --git a/workers_launch_template.tf b/workers_launch_template.tf index e3cded4..d97eb9e 100644 --- a/workers_launch_template.tf +++ b/workers_launch_template.tf @@ -82,7 +82,8 @@ resource "aws_launch_template" "workers_launch_template" { } placement { - tenancy = "${lookup(var.worker_groups_launch_template[count.index], "placement_tenancy", local.workers_group_launch_template_defaults["placement_tenancy"])}" + tenancy = "${lookup(var.worker_groups_launch_template[count.index], "placement_tenancy", local.workers_group_launch_template_defaults["placement_tenancy"])}" + group_name = "${lookup(var.worker_groups_launch_template[count.index], "placement_group", local.workers_group_launch_template_defaults["placement_group"])}" } count = "${var.worker_group_launch_template_count}"