From 312596f46d937c74143ce9a9563438b2b52f0f0e Mon Sep 17 00:00:00 2001 From: graywolf-at-work <43144838+graywolf-at-work@users.noreply.github.com> Date: Wed, 6 May 2020 19:36:58 +0000 Subject: [PATCH] feat: Create kubeconfig with non-executable permissions (#864) * Create kubeconfig with non-executable permissions Kubeconfig does not really need to be executable, so let's not create it with executable bit set. * Bump tf version --- README.md | 4 ++-- kubectl.tf | 8 +++++--- versions.tf | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1141c5d..ec4d1c1 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a | terraform | >= 0.12.9 | | aws | >= 2.52.0 | | kubernetes | >= 1.11.1 | -| local | >= 1.2 | +| local | >= 1.4 | | null | >= 2.1 | | random | >= 2.1 | @@ -141,7 +141,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a |------|---------| | aws | >= 2.52.0 | | kubernetes | >= 1.11.1 | -| local | >= 1.2 | +| local | >= 1.4 | | null | >= 2.1 | | random | >= 2.1 | diff --git a/kubectl.tf b/kubectl.tf index 1e66070..a83f0f9 100644 --- a/kubectl.tf +++ b/kubectl.tf @@ -1,5 +1,7 @@ resource "local_file" "kubeconfig" { - count = var.write_kubeconfig && var.create_eks ? 1 : 0 - content = local.kubeconfig - 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 = local.kubeconfig + filename = substr(var.config_output_path, -1, 1) == "/" ? "${var.config_output_path}kubeconfig_${var.cluster_name}" : var.config_output_path + file_permission = "0644" + directory_permission = "0755" } diff --git a/versions.tf b/versions.tf index e5c8ce6..21e74d2 100644 --- a/versions.tf +++ b/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { aws = ">= 2.52.0" - local = ">= 1.2" + local = ">= 1.4" null = ">= 2.1" random = ">= 2.1" kubernetes = ">= 1.11.1"