Skip to content

Commit

Permalink
fix: Merge tags from Fargate profiles with common tags from cluster (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Lena-nfb authored Dec 23, 2020
1 parent 618019e commit 65777d0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion modules/fargate/fargate.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ resource "aws_eks_fargate_profile" "this" {
pod_execution_role_arn = local.pod_execution_role_arn
subnet_ids = var.subnets
tags = each.value.tags

selector {
namespace = each.value.namespace
labels = lookup(each.value, "labels", null)
Expand Down
2 changes: 1 addition & 1 deletion modules/fargate/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ locals {
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)

fargate_profiles_expanded = { for k, v in var.fargate_profiles : k => merge(
{ tags = var.tags },
v,
{ tags = merge(var.tags, lookup(v, "tags", {})) },
) if var.create_eks }
}

0 comments on commit 65777d0

Please sign in to comment.