From 8a75e848f96c5fd93f2172b4a2534eddfc26b9a3 Mon Sep 17 00:00:00 2001 From: Ben Larabie Date: Tue, 19 Sep 2023 15:31:09 -0400 Subject: [PATCH] Adding karpenter tag to eks security group (#929) --- aws/eks/securitygroups.tf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/aws/eks/securitygroups.tf b/aws/eks/securitygroups.tf index 508167841..7b8a3cf48 100644 --- a/aws/eks/securitygroups.tf +++ b/aws/eks/securitygroups.tf @@ -328,3 +328,10 @@ resource "aws_security_group_rule" "notification-worker-egress-endpoints-gateway security_group_id = aws_security_group.notification-canada-ca-worker.id prefix_list_ids = var.private-links-gateway-prefix-list-ids } + +# Tag EKS Security Group for Karpenter +resource "aws_ec2_tag" "eks_created_security_group_tag" { + resource_id = data.aws_security_group.eks-securitygroup-rds.id + key = "karpenter.sh/discovery" + value = var.eks_cluster_name +} \ No newline at end of file