init
This commit is contained in:
23
start.sh
23
start.sh
@@ -11,6 +11,29 @@ confirm() {
|
||||
[[ "$response" == "y" ]]
|
||||
}
|
||||
|
||||
check_dependencies() {
|
||||
local missing_tools=()
|
||||
|
||||
for tool in terraform helm kubectl; do
|
||||
if ! command -v "$tool" &> /dev/null; then
|
||||
missing_tools+=("$tool")
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${#missing_tools[@]} -ne 0 ]; then
|
||||
echo "Error: Missing required tools: ${missing_tools[*]}"
|
||||
echo "Please install the following tools before running this script:"
|
||||
for tool in "${missing_tools[@]}"; do
|
||||
echo " - $tool"
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "All required tools are available"
|
||||
}
|
||||
|
||||
check_dependencies
|
||||
|
||||
tfplan=$(terraform plan -out=tfplan)
|
||||
|
||||
echo "$tfplan"
|
||||
|
Reference in New Issue
Block a user