mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-22 17:39:05 +01:00
Worker group tags (#252)
* Allow per worker group ASG tags to be set * Format * Set correct defaults * Implement hack that will use the first item in the list if a matching item does not exist for the worker group * Use a map that will map from the worker group name to the tags to get around the issue where list indexing does not work with a list of lists * Format * Cleanup * Fix sample * README
This commit is contained in:
committed by
Max Williams
parent
eac4164c05
commit
35747d707a
@@ -46,7 +46,8 @@ resource "aws_autoscaling_group" "workers_launch_template" {
|
||||
map("key", "kubernetes.io/cluster/${aws_eks_cluster.this.name}", "value", "owned", "propagate_at_launch", true),
|
||||
map("key", "k8s.io/cluster-autoscaler/${lookup(var.worker_groups_launch_template[count.index], "autoscaling_enabled", local.workers_group_launch_template_defaults["autoscaling_enabled"]) == 1 ? "enabled" : "disabled" }", "value", "true", "propagate_at_launch", false)
|
||||
),
|
||||
local.asg_tags)
|
||||
local.asg_tags,
|
||||
var.worker_group_launch_template_tags[contains(keys(var.worker_group_launch_template_tags), "${lookup(var.worker_groups_launch_template[count.index], "name", count.index)}") ? "${lookup(var.worker_groups_launch_template[count.index], "name", count.index)}" : "default"])
|
||||
}"]
|
||||
|
||||
lifecycle {
|
||||
|
||||
Reference in New Issue
Block a user