fix default worker subnets not working (#122)

This commit is contained in:
Touch Ungboriboonpisal
2018-09-11 09:03:23 -07:00
committed by Max Williams
parent 4762908d9b
commit 50404a785b
3 changed files with 3 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
### Changed ### Changed
- A subtle but thoughtful change. (Boomshakalaka, @self 🏀) - A subtle but thoughtful change. (Boomshakalaka, @self 🏀)
- fix default worker subnets not working (by @erks)
## [[v1.6.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v1.5.0...v1.6.0)] - 2018-09-04] ## [[v1.6.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v1.5.0...v1.6.0)] - 2018-09-04]

View File

@@ -26,7 +26,7 @@ locals {
enable_monitoring = true # Enables/disables detailed monitoring. enable_monitoring = true # Enables/disables detailed monitoring.
public_ip = false # Associate a public ip address with a worker public_ip = false # Associate a public ip address with a worker
kubelet_extra_args = "" # This string is passed directly to kubelet if set. Useful for adding labels or taints. kubelet_extra_args = "" # This string is passed directly to kubelet if set. Useful for adding labels or taints.
subnets = "" # A comma delimited string of subnets to place the worker nodes in. i.e. subnet-123,subnet-456,subnet-789 subnets = "${join(",", var.subnets)}" # A comma delimited string of subnets to place the worker nodes in. i.e. subnet-123,subnet-456,subnet-789
autoscaling_enabled = false # Sets whether policy and matching tags will be added to allow autoscaling. autoscaling_enabled = false # Sets whether policy and matching tags will be added to allow autoscaling.
additional_security_group_ids = "" # A comman delimited list of additional security group ids to include in worker launch config additional_security_group_ids = "" # A comman delimited list of additional security group ids to include in worker launch config
} }

View File

@@ -4,7 +4,7 @@ resource "aws_autoscaling_group" "workers" {
max_size = "${lookup(var.worker_groups[count.index], "asg_max_size",lookup(local.workers_group_defaults, "asg_max_size"))}" max_size = "${lookup(var.worker_groups[count.index], "asg_max_size",lookup(local.workers_group_defaults, "asg_max_size"))}"
min_size = "${lookup(var.worker_groups[count.index], "asg_min_size",lookup(local.workers_group_defaults, "asg_min_size"))}" min_size = "${lookup(var.worker_groups[count.index], "asg_min_size",lookup(local.workers_group_defaults, "asg_min_size"))}"
launch_configuration = "${element(aws_launch_configuration.workers.*.id, count.index)}" launch_configuration = "${element(aws_launch_configuration.workers.*.id, count.index)}"
vpc_zone_identifier = ["${split(",", coalesce(lookup(var.worker_groups[count.index], "subnets", ""), join(",", var.subnets)))}"] vpc_zone_identifier = ["${split(",", coalesce(lookup(var.worker_groups[count.index], "subnets", ""), lookup(local.workers_group_defaults, "subnets")))}"]
count = "${var.worker_group_count}" count = "${var.worker_group_count}"
tags = ["${concat( tags = ["${concat(