diff --git a/9c-main/terraform/node_group.tf b/9c-main/terraform/node_group.tf index 11fce6fdf..3915c0681 100644 --- a/9c-main/terraform/node_group.tf +++ b/9c-main/terraform/node_group.tf @@ -35,69 +35,3 @@ resource "aws_eks_node_group" "node_groups" { aws_subnet.public ] } - -# EKS can't directly set the "Name" tag, so we use the autoscaling_group_tag resource. -resource "aws_autoscaling_group_tag" "node_name_tag" { - - for_each = toset([for node in aws_eks_node_group.node_groups : node.resources[0].autoscaling_groups[0].name]) - - autoscaling_group_name = each.value - - tag { - key = "Name" - value = each.value - propagate_at_launch = true - } -} - -resource "aws_autoscaling_group_tag" "node_service_tag" { - - for_each = toset([for node in aws_eks_node_group.node_groups : node.resources[0].autoscaling_groups[0].name]) - - autoscaling_group_name = each.value - - tag { - key = "Service" - value = aws_eks_cluster.cluster.name - propagate_at_launch = true - } -} - -resource "aws_autoscaling_group_tag" "node_environment_tag" { - - for_each = toset([for node in aws_eks_node_group.node_groups : node.resources[0].autoscaling_groups[0].name]) - - autoscaling_group_name = each.value - - tag { - key = "Environment" - value = "production" - propagate_at_launch = true - } -} - -resource "aws_autoscaling_group_tag" "node_owner_tag" { - - for_each = toset([for node in aws_eks_node_group.node_groups : node.resources[0].autoscaling_groups[0].name]) - - autoscaling_group_name = each.value - - tag { - key = "Owner" - value = "jihyung" - propagate_at_launch = true - } -} - -resource "aws_autoscaling_group_tag" "node_team_tag" { - - for_each = toset([for node in aws_eks_node_group.node_groups : node.resources[0].autoscaling_groups[0].name]) - - autoscaling_group_name = each.value - - tag { - key = "Team" - value = "game" - propagate_at_launch = true - } -}