mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-16 16:47:20 +01:00
fix: Use the launch_template_tags on the launch template (#2957)
This commit is contained in:
@@ -264,6 +264,12 @@ module "eks" {
|
|||||||
additional = aws_iam_policy.node_additional.arn
|
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 = {
|
tags = {
|
||||||
ExtraTag = "EKS managed node group complete example"
|
ExtraTag = "EKS managed node group complete example"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -312,7 +312,10 @@ resource "aws_launch_template" "this" {
|
|||||||
user_data = module.user_data.user_data
|
user_data = module.user_data.user_data
|
||||||
vpc_security_group_ids = length(local.network_interfaces) > 0 ? [] : local.security_group_ids
|
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
|
# Prevent premature access of policies by pods that
|
||||||
# require permissions on create/destroy that depend on nodes
|
# require permissions on create/destroy that depend on nodes
|
||||||
|
|||||||
Reference in New Issue
Block a user