From 1fed91afd6f9372e397002a441a26efd75313e96 Mon Sep 17 00:00:00 2001 From: Koyomi Araragi Date: Tue, 16 Jul 2024 18:10:55 -0300 Subject: [PATCH] docs: Improve karpenter discovery tags example (#3097) * docs: Improve karpenter discovery tags example * chore: Re-add general tags declaration --------- Co-authored-by: Bryant Biggs --- examples/karpenter/main.tf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/karpenter/main.tf b/examples/karpenter/main.tf index 9dd3617..14435b6 100644 --- a/examples/karpenter/main.tf +++ b/examples/karpenter/main.tf @@ -101,12 +101,20 @@ module "eks" { } } - tags = merge(local.tags, { + # cluster_tags = merge(local.tags, { + # NOTE - only use this option if you are using "attach_cluster_primary_security_group" + # and you know what you're doing. In this case, you can remove the "node_security_group_tags" below. + # "karpenter.sh/discovery" = local.name + # }) + + node_security_group_tags = merge(local.tags, { # NOTE - if creating multiple security groups with this module, only tag the # security group that Karpenter should utilize with the following tag # (i.e. - at most, only one security group should have this tag in your account) "karpenter.sh/discovery" = local.name }) + + tags = local.tags } ################################################################################