feat(iam): add billing roles to assignable organization roles#248
Merged
Conversation
Organization members had no access to billing resources through their org-level role, so creating a BillingAccount from the portal failed with "User cannot create resource billingaccounts in API group billing.miloapis.com". The billing IAM roles are deployed and registered with Milo (billing-milo-control-plane, targetNamespace milo-system) but were never wired into the assignable organization roles. - Owner and Editor now include billing.miloapis.com-admin (billingaccounts + billingaccountbindings create/update/patch/delete) - Viewer now includes billing.miloapis.com-viewer (list/get/watch) Mirrors the compute-roles wiring in #233.
scotwells
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
billing.miloapis.com-adminbilling.miloapis.com-viewerWhy
Creating a BillingAccount from the cloud portal fails with:
Organization members have no access to billing resources through their org-level role. The billing IAM roles (
billing.miloapis.com-admin/-viewer) are already deployed and registered with Milo —infra/apps/billing-system/base/milo-control-plane.yamlappliesbilling/config/components/iamintomilo-system— but were never wired into the assignable organization roles.billing.miloapis.com-admingrantsbillingaccounts.{create,update,patch,delete}+ thebillingaccountbindingsequivalents (and inherits-viewer);billing.miloapis.com-viewergrants{list,get,watch}.Exactly mirrors the compute-roles wiring in #233.
This follows #233's precedent (Owner and Editor get the resource admin role). But BillingAccounts tie to payment, so you may prefer Owner-only for
-adminand give Editor-viewer. Easy to change — drop the editor entry. Flagging because billing is more sensitive than compute.Rollout
Like #233, this config publishes as an OCI bundle consumed by
datum-cloud/infra. If you want to validate in staging ahead of the bundle, a staging-only patch in infra can apply it first.Verification after deploy
The original portal action (create BillingAccount as an org owner) should succeed; the authz denial should disappear.