Skip to content

Commit

Permalink
strip dir stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jan 13, 2025
1 parent 556dbd5 commit e545867
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions eks_console_access.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ data "http" "cluster_roles" {
resource "null_resource" "cluster_roles" {
for_each = local.cluster_roles_map
triggers = {
roles = join(",", [each.key, each.value.url])
directory = null_resource.setup_directory.triggers.directory
roles = join(",", [each.key, each.value.url])
}
provisioner "local-exec" {
command = "echo '${data.http.cluster_roles[each.key].body}' > ${self.triggers.directory}/${each.value.name}.yaml"
command = "echo '${data.http.cluster_roles[each.key].body}' > ${each.value.name}.yaml"
}
}

Expand All @@ -60,6 +59,6 @@ resource "null_resource" "apply_cluster_roles" {
environment = {
KUBECONFIG = "${path.root}/setup/kube.config"
}
command = "kubectl apply -f setup/${each.value.name}.yaml"
command = "kubectl apply -f ${each.value.name}.yaml"
}
}

0 comments on commit e545867

Please sign in to comment.