Skip to content

Customer onboarding: assess fallout from the invalid RBAC action in the cross-subscription ARM template #1799

Description

@cristim

Found while root-causing #1794. The code fix ships with that issue's PR; this issue is about the operational fallout the code fix does not address.

What happened

arm/CUDly-CrossSubscription/template.json:51 contained Microsoft.Capacity/reservationOrders/purchase/action, which does not exist in Azure's operation catalog. Azure rejects an entire Microsoft.Authorization/roleDefinitions resource that references an unknown action with InvalidActionOrNotAction (400).

Verified against the live catalog and reproduced end to end on the Terraform twin of this role: the deployment fails, and removing the single action makes it succeed. See #1794 for the full evidence.

Why this needs its own issue

That ARM template is customer-facing. Customers deploy it to grant CUDly cross-subscription access during onboarding. Every customer who ran it should have hit the same 400.

The fix corrects the template going forward. It does not tell us:

  1. How many customers attempted onboarding with the broken template, and since when. The invalid action needs a git log -S to date its introduction, which bounds the affected window.
  2. Whether affected customers are in a partial state. The template also declares role assignments that dependsOn the role definition. Those should not have been created, but ARM partial-deployment behaviour should be confirmed rather than assumed, especially given the template declares an assignment at /providers/Microsoft.Capacity scope.
  3. Whether onboarding failures were visible to us at all, or whether customers simply saw a failed ARM deployment and did not report it. If the latter, that is its own gap: a silent onboarding failure mode with no telemetry.
  4. Whether affected customers need to re-run the corrected template, and whether re-running is idempotent for those left partially deployed.

Also worth checking while in here

The ARM template's assignableScopes includes /providers/Microsoft.Capacity, but the Terraform module deliberately removed that scope, documenting that a subscription-scoped principal cannot register an assignable scope above its own subscription and that including it makes the role-definition write 403 at the higher scope.

So ARM and Terraform have diverged on assignable scopes, and the ARM side carries the scope the TF side documented as unusable. The role-parity checker did not flag this. That may be a second latent onboarding failure, independent of the invalid action, and it should be tested rather than reasoned about.

Verification

Deploy the corrected template into a scratch subscription and confirm the role definition and both role assignments are created. Do this specifically for the /providers/Microsoft.Capacity-scoped assignment, which is the one most likely to still fail after the action fix.

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