File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
examples/eks_managed_node_group
modules/eks-managed-node-group Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,12 @@ module "eks" {
264
264
additional = aws_iam_policy.node_additional.arn
265
265
}
266
266
267
+ launch_template_tags = {
268
+ # enable discovery of autoscaling groups by cluster-autoscaler
269
+ " k8s.io/cluster-autoscaler/enabled" : true ,
270
+ " k8s.io/cluster-autoscaler/${ local . name } " : " owned" ,
271
+ }
272
+
267
273
tags = {
268
274
ExtraTag = " EKS managed node group complete example"
269
275
}
Original file line number Diff line number Diff line change @@ -312,7 +312,10 @@ resource "aws_launch_template" "this" {
312
312
user_data = module. user_data . user_data
313
313
vpc_security_group_ids = length (local. network_interfaces ) > 0 ? [] : local. security_group_ids
314
314
315
- tags = var. tags
315
+ tags = merge (
316
+ var. tags ,
317
+ var. launch_template_tags ,
318
+ )
316
319
317
320
# Prevent premature access of policies by pods that
318
321
# require permissions on create/destroy that depend on nodes
You can’t perform that action at this time.
0 commit comments