improvement: update the wait_for_cluster_cmd logic to use curl if wget doesn't exist (#1002)

This commit is contained in:
Dawid Rogaczewski
2020-10-05 14:59:40 +02:00
committed by GitHub
parent c4e95b3b04
commit d8ab5d4d6d
2 changed files with 4 additions and 4 deletions

View File

@@ -200,7 +200,7 @@ variable "cluster_delete_timeout" {
variable "wait_for_cluster_cmd" {
description = "Custom local-exec command to execute for determining if the eks cluster is healthy. Cluster endpoint will be available as an environment variable called ENDPOINT"
type = string
default = "for i in `seq 1 60`; do wget --no-check-certificate -O - -q $ENDPOINT/healthz >/dev/null && exit 0 || true; sleep 5; done; echo TIMEOUT && exit 1"
default = "for i in `seq 1 60`; do if `command -v wget > /dev/null`; then wget --no-check-certificate -O - -q $ENDPOINT/healthz >/dev/null && exit 0 || true; else curl -k -s $ENDPOINT/healthz >/dev/null && exit 0 || true;fi; sleep 5; done; echo TIMEOUT && exit 1"
}
variable "wait_for_cluster_interpreter" {