Skip to content

Commit

Permalink
no chart name?
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jan 21, 2025
1 parent b41202e commit a276f9e
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions eks_console_access.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ locals {
},
]
cluster_roles_map = { for cr in local.cluster_roles : cr.name => cr if cr.enabled }
# roles = provider::kubernetes::manifest_decode_multi(data.http.cluster_roles[each.key].body)
# manifest_doc = { for item in local.cluster_roles_map : "${data.http.cluster_roles[item.name].body}" => item }
}

# Fetch the YAML files from the specified URLs
Expand Down Expand Up @@ -62,38 +60,8 @@ data "http" "cluster_roles" {
# for_each = { for manifest in provider::kubernetes::manifest_decode_multi(data.http.cluster_roles[].body) : "${lower(manifest.kind)}-${manifest.metadata.name}-${manifest.metadata.namespace}" => manifest }
# manifest = [split("---\n", data.http.cluster_roles[each.key].body)]

# resource "null_resource" "apply_cluster_roles" {
# for_each = { for k, v in local.cluster_roles_map : k => v if v.enabled }
# triggers = {
# roles = join(",", [each.key, each.value.url])
# }
# provisioner "local-exec" {
# command = "kubectl apply -f ${each.value.name}.yaml"
# }
# }
# data "kubectl_file_documents" "access_documents" {
# for_each = { for k, v in local.cluster_roles_map : k => v if v.enabled }

# content = data.http.cluster_roles[each.key].body
# }

# locals {
# all_access_documents = flatten([
# for cr_name, cr_data in local.cluster_roles_map : [
# for doc in data.kubectl_file_documents.access_documents[cr_name].manifests : doc
# ] if cr_data.enabled
# ])
# }

# resource "kubectl_manifest" "deploy_cluster_roles" {
# count = length(local.all_access_documents)

# yaml_body = local.all_access_documents[count.index]
# }

resource "helm_release" "console_access" {
for_each = local.cluster_roles_map
chart = each.key
name = each.key
namespace = "default"
version = var.release_version
Expand Down

0 comments on commit a276f9e

Please sign in to comment.