This Repository is a Python script that generates an Excel workbook report from your Azure Advisor recommendations.
Example I - Overview sheet (png)
Example II - Security recommendations (png)
Example III - Full example workbook (xlsx)
Before you begin, ensure you have met the following requirements:
- You own an Azure subscription.
- Latest version of Azure CLI.
- A Python environment with the following libraries installed:
- pandas
- azure-identity
- azure.mgmt.advisor
- dotenv
- datetime
- jinja2 (Version 3.1.2+)
- jq 1.6 (JSON processor to prettify things up )
Tested with Python3.10.12 & AzCli2.53.1
This project is a Python script that generates an Excel workbook report from your Azure Advisor recommendations.
To use Azure Advisor Excel Report Generator, follow these steps:
git clone [email protected]:zakarel/Azure-Advisor-Excel-Reporter.git
- Creation of a service principle with the name: "sp-Azure-Advisor-Excel-Reporter" which will be vaild for 1 year (you can renew the password after that time)
- Creation of an environment hidden file (.env)
- Extraction of the service principle authentication credentials and appending them into the environment file.
- Assigning the subscription reader role to the service principle
-
Changing the to the desired Subscription ID
-
Executing the script with:
bash pre-script.sh
pip install pandas azure-identity azure.mgmt.advisor python-dotenv datetime jinja2
Debian/Ubuntu/Kali based
sudo apt-get install jq
Fedora based
sudo yum install jq
Homebrew(Mac)
brew install jq
python3 azure-advisor-excel-reporter.py
note: If you are getting a Permission denied when trying to execute any of the script first make sure you have granted it the execute permission
chmod +x pre-script.sh
chmod +x azure-advisor-excel-reporter.py
- Tzahi Ariel - Initial work - zakarel
This project is licensed under the MIT License - see the LICENSE file for details