fix: Use the launch_template_tags on the launch template (#2957)

This commit is contained in:
Bryant Biggs
2024-03-07 14:40:43 -05:00
committed by GitHub
parent 71b5031830
commit 0ed32d7b29
2 changed files with 10 additions and 1 deletions

View File

@@ -264,6 +264,12 @@ module "eks" {
additional = aws_iam_policy.node_additional.arn
}
launch_template_tags = {
# enable discovery of autoscaling groups by cluster-autoscaler
"k8s.io/cluster-autoscaler/enabled" : true,
"k8s.io/cluster-autoscaler/${local.name}" : "owned",
}
tags = {
ExtraTag = "EKS managed node group complete example"
}

View File

@@ -312,7 +312,10 @@ resource "aws_launch_template" "this" {
user_data = module.user_data.user_data
vpc_security_group_ids = length(local.network_interfaces) > 0 ? [] : local.security_group_ids
tags = var.tags
tags = merge(
var.tags,
var.launch_template_tags,
)
# Prevent premature access of policies by pods that
# require permissions on create/destroy that depend on nodes