Skip to content

Commit

Permalink
change when kubeconfig runs
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Oct 14, 2021
1 parent 27b0ad8 commit b553cdd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion patch-aws-auth/kubeconfig.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# establish kubeconfig file needed for kubectl patch command
# requires kubectl command in the path

# run only if we have to make changes via patch

resource "null_resource" "kubeconfig" {
triggers = {
always_run = timestamp()
users = join(",", sort(keys(local.merged_users)))
roles = join(",", sort(keys(local.merged_roles)))
}
provisioner "local-exec" {
command = "which kubectl > /dev/null 2>&1; if [ $? != 0 ]; then 'echo missing kubectl'; exit 1; else exit 0; fi"
Expand Down

0 comments on commit b553cdd

Please sign in to comment.