Skip to content

Azure: register Microsoft.BillingBenefits resource provider in custom role #752

Description

@cristim

Summary

The custom role added by PR #744 (and now shared via terraform/modules/iam/azure/cudly-reservation-role) grants Microsoft.Capacity/register/action but not Microsoft.BillingBenefits/register/action. On a customer subscription that has never used Azure Savings Plans, the resource provider Microsoft.BillingBenefits may not be registered. The first Savings Plan order in that subscription will return a 409 MissingSubscriptionRegistration error until the provider is registered out-of-band.

Repro

  1. Use a "Savings Plan virgin" customer subscription (never created a Savings Plan before).
  2. Attempt to create a Savings Plan via CUDly's two-step calculatePrice -> purchase flow.
  3. Observe 409 MissingSubscriptionRegistration for Microsoft.BillingBenefits.

Fix

Append Microsoft.BillingBenefits/register/action to the actions list in both:

  • terraform/modules/iam/azure/cudly-reservation-role/main.tf (shared Terraform module)
  • arm/CUDly-CrossSubscription/template.json (customer ARM template)

Workaround

Until fixed, the customer administrator can run the following once before onboarding:

az provider register --namespace Microsoft.BillingBenefits

Registration is idempotent and typically completes within a few minutes.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions