Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jan 25, 2025
1 parent e521fcf commit 25225f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ sys 0m2.015s
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.14.0 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | >= 2.11.0 |
| <a name="provider_http"></a> [http](#provider\_http) | >= 2.1.0 |
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | >= 2.23.0 |

## Modules
Expand All @@ -63,7 +62,6 @@ sys 0m2.015s
| [kubernetes_storage_class.gp3_encrypted](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/storage_class) | resource |
| [aws_ebs_default_kms_key.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ebs_default_kms_key) | data source |
| [aws_kms_key.ebs_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/kms_key) | data source |
| [http_http.cluster_roles](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |

## Inputs

Expand Down
35 changes: 1 addition & 34 deletions eks_console_access.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,45 +21,12 @@ locals {
{
name = "eks-console-restricted-access"
url = "https://s3.us-west-2.amazonaws.com/amazon-eks/docs/eks-console-restricted-access.yaml"
enabled = false
enabled = true
},
]
cluster_roles_map = { for cr in local.cluster_roles : cr.name => cr if cr.enabled }
}

# Fetch the YAML files from the specified URLs
data "http" "cluster_roles" {
for_each = local.cluster_roles_map
url = each.value.url
}

# resource "null_resource" "cluster_roles" {
# for_each = local.cluster_roles_map
# triggers = {
# roles = join(",", [each.key, each.value.url])
# }
# provisioner "local-exec" {
# command = "echo '${data.http.cluster_roles[each.key].body}' > ${each.value.name}.yaml"
# }
# }

# # Apply the Kubernetes manifests to the cluster
# resource "kubernetes_manifest" "deploy_cluster_roles" {
# manifest = local.manifest_doc

# wait {
# rollout = true
# }
# }

# resource "kubernetes_manifest" "projects" {
# for_each = { for manifest in provider::kubernetes::manifest_decode_multi(file("${path.module}/bootstrap/projects.yaml")) : "${lower(manifest.kind)}-${manifest.metadata.name}-${manifest.metadata.namespace}" => manifest }
# manifest = each.value
# }

# 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 "helm_release" "console_access" {
for_each = local.cluster_roles_map
chart = each.key
Expand Down

0 comments on commit 25225f8

Please sign in to comment.