mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-04-22 08:38:25 +02:00
fix: Merge tags from Fargate profiles with common tags from cluster (#1159)
This commit is contained in:
@@ -20,7 +20,6 @@ resource "aws_eks_fargate_profile" "this" {
|
|||||||
pod_execution_role_arn = local.pod_execution_role_arn
|
pod_execution_role_arn = local.pod_execution_role_arn
|
||||||
subnet_ids = var.subnets
|
subnet_ids = var.subnets
|
||||||
tags = each.value.tags
|
tags = each.value.tags
|
||||||
|
|
||||||
selector {
|
selector {
|
||||||
namespace = each.value.namespace
|
namespace = each.value.namespace
|
||||||
labels = lookup(each.value, "labels", null)
|
labels = lookup(each.value, "labels", null)
|
||||||
|
|||||||
@@ -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)
|
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(
|
fargate_profiles_expanded = { for k, v in var.fargate_profiles : k => merge(
|
||||||
{ tags = var.tags },
|
|
||||||
v,
|
v,
|
||||||
|
{ tags = merge(var.tags, lookup(v, "tags", {})) },
|
||||||
) if var.create_eks }
|
) if var.create_eks }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user