Azure-sh framework and library for management and optimization Azure Resource Group (ARM) resources and services. Azure-Sh framework targeted for linux environment and works perfectly on Ubuntu, CentOS and other popular distros.
You need to install JQ tool for JSON parsing - inside Azure-Sh json is most popular format and using this tool makes most of things related to parsing and searching inside json much easier.
sudo apt-get install jq
tbd how to get/build from github source code
- Get all statistic about all resources
./get_all_stat.sh
- Get all statistic grouped by regions:
./get_region_stat.sh
- Get statistics grouped by resource type:
./get_types_stat.sh
- Full list of all resource groups It's not a really part of azure-sh, just oneline helper - we do skip first 4 lines there because it's just header, not a names
azure resource list | tail -n +5 | awk ' {print $4} ' | sort -u
- Cleaup all resources inside specified resource group
./cleanup_rg.sh %resource_group_name%