diff --git a/eks_console_access.tf b/eks_console_access.tf index 57aec29..60b208f 100644 --- a/eks_console_access.tf +++ b/eks_console_access.tf @@ -55,7 +55,7 @@ resource "kubernetes_manifest" "deploy_cluster_roles" { for value in [ for yaml in split( "\n---\n", - "${replace(data.http.cluster_roles[each.key].body, "/(?m)^---[[:blank:]]*(#.*)?$/", "---")}\n" + "${replace(yamldecode(data.http.cluster_roles[each.key].body), "/(?m)^---[[:blank:]]*(#.*)?$/", "---")}\n" ) : yamldecode(yaml) if trimspace(replace(yaml, "/(?m)(^[[:blank:]]*(#.*)?$)+/", "")) != ""