Skip to content

Commit fd1f149

Browse files
matheussmax-rocket-internet
authored andcommitted
Add support for placement groups (#306)
1 parent bef3c36 commit fd1f149

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
### Added
1313

14+
- Ability to specify a placement group for each worker group (by @matheuss)
1415
- "k8s.io/cluster-autoscaler/{cluster-name}" and "k8s.io/cluster-autoscaler/node-template/resources/ephemeral-storage" tags for autoscaling groups (by @tbarrella)
1516
- Added "ec2:DescribeLaunchTemplateVersions" action to worker instance role (by @skang0601)
1617
- Adding ebs encryption for workers launched using workers_launch_template (by @russki)

local.tf

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

4344
workers_group_defaults = "${merge(local.workers_group_defaults_defaults, var.workers_group_defaults)}"

workers.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ resource "aws_autoscaling_group" "workers" {
1313
suspended_processes = ["${compact(split(",", coalesce(lookup(var.worker_groups[count.index], "suspended_processes", ""), local.workers_group_defaults["suspended_processes"])))}"]
1414
enabled_metrics = ["${compact(split(",", coalesce(lookup(var.worker_groups[count.index], "enabled_metrics", ""), local.workers_group_defaults["enabled_metrics"])))}"]
1515
count = "${var.worker_group_count}"
16+
placement_group = "${lookup(var.worker_groups[count.index], "placement_group", local.workers_group_defaults["placement_group"])}"
1617

1718
tags = ["${concat(
1819
list(

0 commit comments

Comments
 (0)