diff --git a/README.md b/README.md
index 7eb2587..4b6bd84 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,6 @@ sys 0m2.015s
| [aws](#requirement\_aws) | >= 5.14.0 |
| [http](#requirement\_http) | >= 2.1.0 |
| [kubernetes](#requirement\_kubernetes) | >= 2.23.0 |
-| [null](#requirement\_null) | >= 1.0 |
## Providers
@@ -44,7 +43,6 @@ sys 0m2.015s
| [aws](#provider\_aws) | 5.83.1 |
| [http](#provider\_http) | 3.4.5 |
| [kubernetes](#provider\_kubernetes) | 2.35.1 |
-| [null](#provider\_null) | >= 1.0 |
## Modules
@@ -61,7 +59,6 @@ sys 0m2.015s
| [kubernetes_storage_class.ebs_encrypted](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/storage_class) | resource |
| [kubernetes_storage_class.efs_sc](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/storage_class) | resource |
| [kubernetes_storage_class.gp3_encrypted](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/storage_class) | resource |
-| [null_resource.cluster_roles](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | 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 |
diff --git a/eks_console_access.tf b/eks_console_access.tf
index 9543f95..8dc01f9 100644
--- a/eks_console_access.tf
+++ b/eks_console_access.tf
@@ -33,21 +33,24 @@ data "http" "cluster_roles" {
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"
- }
-}
+# 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" {
# depends_on = [null_resource.cluster_roles]
for_each = { for k, v in local.cluster_roles_map : k => v if v.enabled }
- manifest = [split("---", yamldecode(data.http.cluster_roles[each.key].body))]
+ triggers = {
+ roles = join(",", [each.key, each.value.url])
+ }
+ manifest = manifest_decode(data.http.cluster_roles[each.key].body)
}
# resource "null_resource" "apply_cluster_roles" {
diff --git a/requirements.tf b/requirements.tf
index 293d403..912400a 100644
--- a/requirements.tf
+++ b/requirements.tf
@@ -14,9 +14,5 @@ terraform {
source = "hashicorp/kubernetes"
version = ">= 2.23.0"
}
- null = {
- source = "hashicorp/null"
- version = ">= 1.0"
- }
}
}