#!/bin/bash # Конфигурационные переменные RESOURCE_GROUP="expense-tracker-group" # Проверяем существование группы ресурсов перед удалением GROUP_EXISTS=$(az group exists --name $RESOURCE_GROUP) if [ "$GROUP_EXISTS" = "true" ]; then # Удаляем всю группу ресурсов и все ресурсы в ней echo "Removing all Azure resources..." az group delete --name $RESOURCE_GROUP --yes --no-wait echo "Removal command issued. All resources in resource group $RESOURCE_GROUP will be removed." echo "Note: The actual deletion may take a few minutes to complete in Azure." else echo "Resource group $RESOURCE_GROUP does not exist or you don't have permissions to access it." fi