Skip to content

Commit

Permalink
feat: Create kubeconfig with non-executable permissions (#864)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
graywolf-at-work authored May 6, 2020
1 parent 99f59bf commit 312596f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ MIT Licensed. See [LICENSE](https:/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 |

Expand All @@ -141,7 +141,7 @@ MIT Licensed. See [LICENSE](https:/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 |

Expand Down
8 changes: 5 additions & 3 deletions kubectl.tf
Original file line number Diff line number Diff line change
@@ -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"
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 312596f

Please sign in to comment.