fix: Add conditional variable to allow users to opt out of tagging cluster primary security group (#2034)

This commit is contained in:
Bryant Biggs
2022-04-21 11:34:58 -04:00
committed by GitHub
parent 5815d17cd2
commit 51e418216f
7 changed files with 12 additions and 7 deletions

View File

@@ -63,7 +63,7 @@ resource "aws_ec2_tag" "cluster_primary_security_group" {
# This should not affect the name of the cluster primary security group
# Ref: https://github.com/terraform-aws-modules/terraform-aws-eks/pull/2006
# Ref: https://github.com/terraform-aws-modules/terraform-aws-eks/pull/2008
for_each = { for k, v in merge(var.tags, var.cluster_tags) : k => v if local.create && k != "Name" }
for_each = { for k, v in merge(var.tags, var.cluster_tags) : k => v if local.create && k != "Name" && var.create_cluster_primary_security_group_tags }
resource_id = aws_eks_cluster.this[0].vpc_config[0].cluster_security_group_id
key = each.key