Tutorials
1. Setup eraXplor for your Azure Authentication
This tutorial walks you through setting up of eraXplor-azure to start exporting your Azure cost data automatically.
Prerequisites
- Azure CLI
-
Check that by:
python3 --version
Steps
- Install eraXplor-azure:
pip install eraXplor
- Azure login The Tool support multiple authentication e.g. Azure CLI login, Managed Identity, etc. You can login by running the following command: it's require to install azure cli first form the link above
az login
- Run eraXplor:
List all subscription costs
eraXplor-azure
Run for specific subscription:
eraXplor-azure -S SUBSCRIPTION_ID
eraXplor-azure <--start-date [yyyy,MM,DD]> <--end-date [yyyy,MM,DD]> \
<--subscription_id [SUBSCRIPTION_ID]> \
<--granularity [Daily | Monthly]> \
<--output [FILE_NAME.CSV]>
For Windows/PowerShell users restart your terminal, and you may need to use the following command:
python3 -m eraXplor-azure
# Or
python -m eraXplor-azure
# to avoid using this command, apend the eraXplor to your paths.
# Normaly its under: C:\Users\<YourUser>\AppData\Local\Programs\Python\Python<version>\Scripts\
Note
Ensure you run the command in a place you have sufficient permission to replace file. The eraXport tool sorting cost reult into a CSV file, by default The CSV will replace for next run.
Argument Reference
--start-dateor-s: (Optional) Default value set as three months before.--end-dateor-e: (Optional) Default value set as Today date.--subscription_idor-S: (Optional) subscription id, Default value set to list all subscriptions with tags.--outor-o: (Optional) Default value set asaz_cost_report.csv.--granularityor-g: (Optional) Default value set asMonthly. The available options are (Monthly,Daily)