#!/usr/bin/env bash echo "๐Ÿงช checking we have tofu insatalled..." if ! command -v tofu &> /dev/null then echo "โŒ tofu could not be found, please install it first" echo echo "see https://opentofu.org/docs/intro/install/standalone/" echo echo "and https://opentofu.org/docs/intro/install/ for more details" echo exit 1 fi echo "โœ… tofu is installed,..." echo tofu version echo echo "๐Ÿงช checking we have gcloud insatalled..." if ! command -v gcloud &> /dev/null then echo "โŒ gcloud could not be found, please install it first" echo echo "see https://cloud.google.com/sdk/docs/install" echo exit 1 fi echo "โœ… gcloud is installed,..." echo gcloud version echo echo "๐Ÿงช checking we have kubectl insatalled..." if ! command -v kubectl &> /dev/null then echo "โŒ kubectl could not be found, please install it first" echo echo "see https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/" echo exit 1 fi echo "โœ… kubectl is installed,..." echo kubectl version --client echo echo "๐Ÿงช checking we have envsubst insatalled..." if ! command -v envsubst &> /dev/null then echo "โŒ envsubst could not be found, please install it first" echo echo "on ubuntu you can install it with: sudo apt-get install -y gettext-base" echo exit 1 fi echo "โœ… envsubst is installed,..." echo envsubst --version echo echo "โœ… Pre-flight checks passed. You are ready to proceed ๐Ÿ™‚" echo