Skip to content

feat(ladder): phase 4 - Azure (BillingBenefits savings plans + reservation exchange) #28

Open

Description

@cristim

Part of LeanerCloud/cloud-commitments-cli#1333 (commitment laddering automation). Phase 4 of 4: Azure implementation (Azure has both needed instruments: exchangeable Reservations and Savings Plans for Compute).

PRs:

  1. Azure read side: list existing savings plans via Microsoft.BillingBenefits; savings-plan utilization via Cost Management benefitUtilizationSummaries; usage baseline from Cost Management series. Reservation utilization already exists (getRIUtilizationViaAPI).
  2. Azure write side: new savings-plan purchase client (providers/azure/services/savingsplan/, Microsoft.BillingBenefits/savingsPlanOrders, validate-then-put, api-version confirmed against current docs) and reservation exchange client (POST /providers/Microsoft.Capacity/calculateExchange -> POST /providers/Microsoft.Capacity/exchange, async operation polling) with the same spend-cap guardrails as the AWS exchange path. All raw-HTTP clients MUST use httpclient.New() (SSRF/IMDS blocking).
  3. AzureLadder capability + enablement: implements LadderCapability with 2 layers (Reservation = base+buffer, SavingsPlan = flex); pipeline enablement for Azure scopes.

Activity

  1. cristim commented on Oct 17, 2026

    @cristim
    MemberAuthor

    Checked against main: Azure savings plan listing, the OrderAlias purchase and the reservation exchange are already in. What is missing is the read side (benefitUtilizationSummaries, the usage baseline) and an AzureLadder. The reader has no caller until AzureLadder exists, and AzureLadder depends on the pkg/ladder contract that #441 is changing. Blocked on #441; next slice once it merges: the utilization reader plus AzureLadder wiring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions