From 09785ee59292e6bc8fc6a1db7f57c7fd9cb29d73 Mon Sep 17 00:00:00 2001 From: Cristian Magherusan-Stanciu Date: Wed, 27 May 2026 14:21:48 +0200 Subject: [PATCH] fix(iac/azure): register Microsoft.BillingBenefits RP via custom role (closes #752) SP-virgin subscriptions 409 with MissingSubscriptionRegistration on the first Savings Plan order because the Microsoft.BillingBenefits resource provider is not auto-registered. Adding Microsoft.BillingBenefits/register/action to the custom role lets CUDly register the RP on first use without requiring the customer to pre-register it manually via az provider register. --- arm/CUDly-CrossSubscription/template.json | 1 + terraform/modules/iam/azure/cudly-reservation-role/main.tf | 1 + 2 files changed, 2 insertions(+) diff --git a/arm/CUDly-CrossSubscription/template.json b/arm/CUDly-CrossSubscription/template.json index 8b7f17e21..b7163cbd6 100644 --- a/arm/CUDly-CrossSubscription/template.json +++ b/arm/CUDly-CrossSubscription/template.json @@ -50,6 +50,7 @@ "Microsoft.Capacity/reservationOrders/write", "Microsoft.Capacity/reservationOrders/purchase/action", "Microsoft.Capacity/reservationOrders/reservations/read", + "Microsoft.BillingBenefits/register/action", "Microsoft.BillingBenefits/savingsPlanOrderAliases/write", "Microsoft.BillingBenefits/savingsPlanOrders/read", "Microsoft.BillingBenefits/savingsPlanOrders/savingsPlans/read", diff --git a/terraform/modules/iam/azure/cudly-reservation-role/main.tf b/terraform/modules/iam/azure/cudly-reservation-role/main.tf index bdd840881..0e66ce6f3 100644 --- a/terraform/modules/iam/azure/cudly-reservation-role/main.tf +++ b/terraform/modules/iam/azure/cudly-reservation-role/main.tf @@ -35,6 +35,7 @@ resource "azurerm_role_definition" "cudly_reservation_purchaser" { "Microsoft.Capacity/reservationOrders/write", "Microsoft.Capacity/reservationOrders/purchase/action", "Microsoft.Capacity/reservationOrders/reservations/read", + "Microsoft.BillingBenefits/register/action", "Microsoft.BillingBenefits/savingsPlanOrderAliases/write", "Microsoft.BillingBenefits/savingsPlanOrders/read", "Microsoft.BillingBenefits/savingsPlanOrders/savingsPlans/read",