This commit is contained in:
2025-08-11 08:57:16 +07:00
parent 87ae088429
commit 0e1ea2f553
2 changed files with 31 additions and 5 deletions

View File

@@ -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"