Skip to content

Commit

Permalink
docs: Improve karpenter discovery tags example (#3097)
Browse files Browse the repository at this point in the history
* docs: Improve karpenter discovery tags example

* chore: Re-add general tags declaration

---------

Co-authored-by: Bryant Biggs <[email protected]>
  • Loading branch information
AlissonRS and bryantbiggs authored Jul 16, 2024
1 parent e32c29f commit 1fed91a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples/karpenter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

################################################################################
Expand Down

0 comments on commit 1fed91a

Please sign in to comment.