feat: Add tags to EKS created cluster security group to match rest of module tagging scheme (#1957)

This commit is contained in:
Bryant Biggs
2022-03-24 03:05:59 -04:00
committed by GitHub
parent ca7854a49c
commit 9371a2943b
2 changed files with 9 additions and 0 deletions

View File

@@ -59,6 +59,14 @@ resource "aws_eks_cluster" "this" {
]
}
resource "aws_ec2_tag" "cluster_primary_security_group" {
for_each = { for k, v in merge(var.tags, var.cluster_tags) : k => v if var.create }
resource_id = aws_eks_cluster.this[0].vpc_config[0].cluster_security_group_id
key = each.key
value = each.value
}
resource "aws_cloudwatch_log_group" "this" {
count = local.create && var.create_cloudwatch_log_group ? 1 : 0