Fix zsh-specific syntax in retry loop within null_resource.update_config_map_aws_auth (#245)

* Fixed zsh-specific syntax, fail if kubectl apply fails after 10 attempts

* Updated CHANGELOG
This commit is contained in:
Marcello Romani
2019-01-15 11:11:24 +00:00
committed by Max Williams
parent 95d4e78f2f
commit 91eb56f4aa
2 changed files with 7 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ resource "null_resource" "update_config_map_aws_auth" {
depends_on = ["aws_eks_cluster.this"]
provisioner "local-exec" {
command = "for i in {1..5}; do kubectl apply -f ${var.config_output_path}config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}kubeconfig_${var.cluster_name} && break || sleep 10; done"
command = "for i in `seq 1 10`; do kubectl apply -f ${var.config_output_path}config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}kubeconfig_${var.cluster_name} && exit 0 || sleep 10; done; exit 1"
interpreter = ["${var.local_exec_interpreter}"]
}