Skip to content

Commit

Permalink
fix(kubeconfig): Set sensible file and directory permissions on kubec…
Browse files Browse the repository at this point in the history
…onfig file
  • Loading branch information
js-timbirkett committed Mar 9, 2020
1 parent 72ef65a commit 2838035
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/control_plane/kubectl.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

resource "local_file" "kubeconfig" {
count = var.write_kubeconfig && var.create_eks ? 1 : 0
content = data.template_file.kubeconfig[0].rendered
filename = substr(var.config_output_path, -1, 1) == "/" ? "${var.config_output_path}kubeconfig_${var.cluster_name}" : var.config_output_path
count = var.write_kubeconfig && var.create_eks ? 1 : 0
content = data.template_file.kubeconfig[0].rendered
filename = substr(var.config_output_path, -1, 1) == "/" ? "${var.config_output_path}kubeconfig_${var.cluster_name}" : var.config_output_path
directory_permission = "0750"
file_permission = "0600"
}

0 comments on commit 2838035

Please sign in to comment.