Skip to content

Commit

Permalink
chore(karpenter): Ignore kubernetes_groups changes in lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
kahirokunn committed Sep 18, 2024
1 parent 6409db6 commit cc380d8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions patterns/karpenter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,16 @@ resource "aws_eks_access_entry" "karpenter_node_access_entry" {
principal_arn = module.eks_blueprints_addons.karpenter.node_iam_role_arn
kubernetes_groups = []
type = "EC2_LINUX"

# EKS automatically adds the 'system:nodes' group to kubernetes_groups.
# Terraform detects this auto-added group and attempts to remove it.
# To prevent this, we ignore changes to kubernetes_groups.
# This avoids unnecessary drift between Terraform state and actual EKS state.
lifecycle {
ignore_changes = [
kubernetes_groups
]
}
}

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

0 comments on commit cc380d8

Please sign in to comment.