mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-16 16:47:20 +01:00
Merge pull request #61 from bshelton229/worker-subnets
Optionally define worker subnets
This commit is contained in:
@@ -91,6 +91,7 @@ variable "workers_group_defaults" {
|
||||
ebs_optimized = true # sets whether to use ebs optimization on supported types.
|
||||
public_ip = false # Associate a public ip address with a worker
|
||||
kubelet_node_labels = "" # This string is passed directly to kubelet via --node-lables= if set. It should be comma delimited with no spaces. If left empty no --node-labels switch is added.
|
||||
subnets = "" # A comma delimited string of subnets to place the worker nodes in. i.e. subnet-123,subnet-456,subnet-789
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ resource "aws_autoscaling_group" "workers" {
|
||||
max_size = "${lookup(var.worker_groups[count.index], "asg_max_size",lookup(var.workers_group_defaults, "asg_max_size"))}"
|
||||
min_size = "${lookup(var.worker_groups[count.index], "asg_min_size",lookup(var.workers_group_defaults, "asg_min_size"))}"
|
||||
launch_configuration = "${element(aws_launch_configuration.workers.*.id, count.index)}"
|
||||
vpc_zone_identifier = ["${var.subnets}"]
|
||||
vpc_zone_identifier = ["${split(",", coalesce(lookup(var.worker_groups[count.index], "subnets", ""), join(",", var.subnets)))}"]
|
||||
count = "${length(var.worker_groups)}"
|
||||
|
||||
tags = ["${concat(
|
||||
|
||||
Reference in New Issue
Block a user