collie-cli icon indicating copy to clipboard operation
collie-cli copied to clipboard

az costmanagement query deprecated

Open JohannesRudolph opened this issue 3 years ago • 1 comments

Describe the bug Azure CLI no longer ships the az costmanagement query command used by collie https://github.com/Azure/azure-cli-extensions/blob/main/src/costmanagement/HISTORY.rst#021

This means that attempts to fetch cost data from azure fail for users with that new version of the azure cli extension installed.

Reach of the bug Only users using Azure with that new version of the azure cli extension installed.

Impact of the bug collie tenant costs command fails with errors

To Reproduce

  1. az extension list. verify v0.2.1 of costmanagement extension is installed, e.g.
[
  {
    "experimental": false,
    "extensionType": "whl",
    "name": "costmanagement",
    "path": "/home/jrudolph/.azure/cliextensions/costmanagement",
    "preview": false,
    "version": "0.2.1"
  }
]
  1. collie tenant costs

Expected behavior Collie fetches cost data as before.

Azure CLI extension release notes claim

You can aggregate or filter the raw data from az costmanagement export instead.

JohannesRudolph avatar Apr 26 '22 15:04 JohannesRudolph

A workaround for this issue is explicitly installing a working version that predates this breaking change

az extension remove -n costmanagement
az extension add --name costmanagement --version 0.1.1

JohannesRudolph avatar Apr 26 '22 15:04 JohannesRudolph