Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Azure Consumption to Cost Details API #1222

Open
11 tasks
4upz opened this issue Aug 22, 2023 · 0 comments
Open
11 tasks

Migrate Azure Consumption to Cost Details API #1222

4upz opened this issue Aug 22, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@4upz
Copy link
Member

4upz commented Aug 22, 2023

Context

Overview

we need to transition from using the deprecated "Usage Details List" API for querying usage data to the new "Cost Details" API provided by the Azure's Cost Management service. This transition will involve updating the Azure package and making use of the "Cost Details" API for generating reports and fetching usage data.

Out of Scope:

  • Storing historical rows in the cache or copying reports to the user's account using Azure blobs
  • Implementing support for usage date via Exports
  • Handling report expiration for date ranges

Related issues/Dependencies:

Acceptance Criteria

  • Replace all calls to the deprecated "Usage Details List" API with calls to the "Cost Details" API.
  • Ensure that the code is updated to use the " @azure/arm-csotmanagement" library in place of the "@azure/arm-consumption" library.
  • Implement logic to chunk API calls into manageable date ranges, and provide a configuration option to customize the maximum chunk size.
  • Ensure that the code can handle a maximum time range of one month per report and is capable of handling historical data for up to 13 months prior.

Tech Tasks

  • Update the test suite to cover the new API calls and edge cases.
  • Execute Changesets to track code changes related to API replacement.
  • Bump any packages that have been updated during the transition.
  • If changes affect the client, API, or CLI packages, update the create-app templates accordingly.
  • Run the test-create-app script to validate that the create-app templates still function correctly.

Tech Notes

  • Create an ADR and Document the specific changes made to transition to the "Cost Details" API and any considerations or limitations encountered during this process. (See notes in spike ticket)
  • Important: This should be considered a major update for the Azure package.

Review Tasks

  • Conduct thorough testing to ensure that the transition does not introduce new bugs.
  • Update the project documentation to reflect the new methodology for fetching subscription usage data -- including new instructions on connecting data via billing id or subscription id.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🔖 Ready To Do
Development

No branches or pull requests

1 participant