Skip to content

Commit 6de0825

Browse files
monsterxx03max-rocket-internet
authored andcommitted
Add option to change worker placement_tenancy. (#142)
* Add option to change worker placement_tenancy. * update CHANGELOG.md
1 parent 5d9d4fb commit 6de0825

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
@@ -12,6 +12,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1212
- A useful addition (slam dunk, @self 🔥)
1313
- Worker groups can be created with a specified IAM profile. (from @laverya)
1414
- exposed `aws_eks_cluster` create and destroy timeouts (by @RGPosadas)
15+
- exposed `placement_tenancy` for autoscaling group (by @monsterxx03)
1516
- Allow port 443 from EKS service to nodes to run `metrics-server`. (by @max-rocket-internet)
1617

1718
### Changed

local.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ locals {
1717
asg_min_size = "1" # Minimum worker capacity in the autoscaling group.
1818
instance_type = "m4.large" # Size of the workers instances.
1919
spot_price = "" # Cost of spot instance.
20+
placement_tenancy = "" # The tenancy of the instance. Valid values are "default" or "dedicated".
2021
root_volume_size = "100" # root volume size of workers instances.
2122
root_volume_type = "gp2" # root volume type of workers instances, can be 'standard', 'gp2', or 'io1'
2223
root_iops = "0" # The amount of provisioned IOPS. This must be set with a volume_type of "io1".

workers.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ resource "aws_launch_configuration" "workers" {
3434
ebs_optimized = "${lookup(var.worker_groups[count.index], "ebs_optimized", lookup(local.ebs_optimized, lookup(var.worker_groups[count.index], "instance_type", local.workers_group_defaults["instance_type"]), false))}"
3535
enable_monitoring = "${lookup(var.worker_groups[count.index], "enable_monitoring", local.workers_group_defaults["enable_monitoring"])}"
3636
spot_price = "${lookup(var.worker_groups[count.index], "spot_price", local.workers_group_defaults["spot_price"])}"
37+
placement_tenancy = "${lookup(var.worker_groups[count.index], "placement_tenancy", local.workers_group_defaults["placement_tenancy"])}"
3738
count = "${var.worker_group_count}"
3839

3940
lifecycle {

0 commit comments

Comments
 (0)