Skip to content

Commit 65777d0

Browse files
authored
fix: Merge tags from Fargate profiles with common tags from cluster (#1159)
1 parent 618019e commit 65777d0

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

modules/fargate/fargate.tf

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ resource "aws_eks_fargate_profile" "this" {
2020
pod_execution_role_arn = local.pod_execution_role_arn
2121
subnet_ids = var.subnets
2222
tags = each.value.tags
23-
2423
selector {
2524
namespace = each.value.namespace
2625
labels = lookup(each.value, "labels", null)

modules/fargate/locals.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ locals {
44
pod_execution_role_name = var.create_fargate_pod_execution_role ? element(concat(aws_iam_role.eks_fargate_pod.*.name, list("")), 0) : element(concat(data.aws_iam_role.custom_fargate_iam_role.*.name, list("")), 0)
55

66
fargate_profiles_expanded = { for k, v in var.fargate_profiles : k => merge(
7-
{ tags = var.tags },
87
v,
8+
{ tags = merge(var.tags, lookup(v, "tags", {})) },
99
) if var.create_eks }
1010
}

0 commit comments

Comments
 (0)