brew tap stangirard/tap
brew install pricypricyIf you are using sso for credentials on aws
pricy --ssoThese are the flags required for enabling a cloud provider
--aws- Enable AWS--sso: Use sso for credentials foraws
--azure- Enable Azuresubscription: Azure subscription id you want the report to be generated for
There are a couple of parameters that you can use
--details: Show the details of the report with the pricing by service--csv: Output the report as csv toreports.csv--evolution: Show the evolution of the report asevolution.csv--days: Number of days to look back for--interval: Date Interval on which the report is generated (Default last 14 days) (Format: YYYY-MM-DD:YYYY-MM-DD)--granularity: Granularity of the report, can bedaily,monthly--html: Output the report as html topricy.html--prometheus: Outputs as prometheus metrics onhttp://localhost:2112/metricsthat can be scraped by prometheus--gsheets: Outputs the report to a google sheets spreadsheet
You need to export the variable GOOGLE_APPLICATION_CREDENTIALS to the path of your json file which contains your OAuth2 credentials.
In oder to get the credentials, you follow this guide:
- Google Cloud Platform
- Activate Sheets API
- Create a credentials for Oauth2 for Desktop Application
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/credentials.json"pricy --aws --sso --csv --gsheet --days 30
pricy --aws --sso --days 150 --granularity monthly --htmlGenerates a report for the price starting a 150 days ago
pricy --aws --sso --prometheus Generates the prometheus metrics for the price updating every 8 hours


