Skip to content

Commit b81a15a

Browse files
rverma-nikiaimax-rocket-internet
authored andcommitted
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
1 parent fb59e4f commit b81a15a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

local.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ locals {
8282
suspended_processes = "" # A comma delimited string of processes to to suspend. i.e. AZRebalance,HealthCheck,ReplaceUnhealthy
8383
target_group_arns = "" # A comma delimited list of ALB target group ARNs to be associated to the ASG
8484
enabled_metrics = "" # A comma delimited list of metrics to be collected i.e. GroupMinSize,GroupMaxSize,GroupDesiredCapacity
85+
placement_group = "" # The name of the placement group into which to launch the instances, if any.
8586
}
8687

8788
workers_group_launch_template_defaults = "${merge(local.workers_group_launch_template_defaults_defaults, var.workers_group_launch_template_defaults)}"

workers_launch_template.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ resource "aws_launch_template" "workers_launch_template" {
8282
}
8383

8484
placement {
85-
tenancy = "${lookup(var.worker_groups_launch_template[count.index], "placement_tenancy", local.workers_group_launch_template_defaults["placement_tenancy"])}"
85+
tenancy = "${lookup(var.worker_groups_launch_template[count.index], "placement_tenancy", local.workers_group_launch_template_defaults["placement_tenancy"])}"
86+
group_name = "${lookup(var.worker_groups_launch_template[count.index], "placement_group", local.workers_group_launch_template_defaults["placement_group"])}"
8687
}
8788

8889
count = "${var.worker_group_launch_template_count}"

0 commit comments

Comments
 (0)