From b831a3fe78788f2fc4dcbb6a6c7ccf01c47837d9 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Mon, 13 Jan 2025 16:02:37 -0500 Subject: [PATCH] use url via map v2 --- eks_console_access.tf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eks_console_access.tf b/eks_console_access.tf index ad3bf20..ddf1ca3 100644 --- a/eks_console_access.tf +++ b/eks_console_access.tf @@ -25,7 +25,7 @@ locals { }, ] cluster_roles_map = { for cr in local.cluster_roles : cr.name => cr if cr.enabled } - all_access_documents = flatten([for name, url in local.cluster_roles : [yamldecode(data.http.cluster_roles[name].body)]]) + all_access_documents = flatten([for name, url in local.cluster_roles_map : [yamldecode(data.http.cluster_roles[name].body)]]) } # Fetch the YAML files from the specified URLs @@ -34,10 +34,8 @@ data "http" "cluster_roles" { url = each.value.url } - # Apply the Kubernetes manifests to the cluster resource "kubernetes_manifest" "deploy_cluster_roles" { for_each = { for idx, doc in local.all_access_documents : idx => doc } - manifest = each.value }