tpl/gcp/bin/base/setup-tunnel.sh.tt in kite-0.1.0 vs tpl/gcp/bin/base/setup-tunnel.sh.tt in kite-0.2.0

- old
+ new

@@ -1,8 +1,13 @@ #!/usr/bin/env bash + pushd terraform BASTION_IP="$(terraform output bastion_ip)" popd -ssh -D 5000 -fNC kite@$BASTION_IP -i <%= @values['kite']['private_key_path'] %> - -export BOSH_ALL_PROXY=socks5://localhost:5000 +if [[ -z "${BASTION_IP}" ]]; then + echo "Something goes wrong, please check terraform environement" 1>&2 + false +else + ssh -D 5000 -fNC kite@${BASTION_IP} -i <%= @values['kite']['private_key_path'] %> + export BOSH_ALL_PROXY=socks5://localhost:5000 +fi