Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use the launch_template_tags on the launch template #2957

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions examples/eks_managed_node_group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
5 changes: 4 additions & 1 deletion modules/eks-managed-node-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down