πŸ’Έ How to Enable Cost Allocation for Shared Resources in Azure

Shared Azure services like hub networking, central logging, or shared AKS clusters often support multiple teams β€” but their costs land in a single resource group or subscription. Azure Cost Allocation helps you reassign those costs to consuming scopes (like other subscriptions or tagged teams) for showback or chargeback β€” without affecting actual billing.


βœ… Prerequisites

  • You must be using a Microsoft Customer Agreement (MCA) or Enterprise Agreement (EA).
  • Role requirements:
    • EA: Enterprise Administrator
    • MCA: Billing Account Owner or Billing Profile Contributor
  • Not supported under CSP or individual pay-as-you-go subscriptions.
  • Allocation does not affect actual charges or invoices β€” it’s only for reporting purposes.

🧭 Step-by-Step Setup

1. Identify Shared Costs

  • Example: A Networking-Shared subscription or resource group that hosts ExpressRoute and firewalls.
  • Choose one or more source scopes (subscriptions, resource groups, or tags).
  • Choose one or more target scopes (subscriptions, resource groups, or tags) that will receive a share of those costs.

2. Navigate to Cost Allocation Settings

  1. Go to Azure Portal > Cost Management + Billing.
  2. Under your Billing Account scope, go to: Cost Management > Settings > Cost allocation
  3. Click + Add to create a new rule.

3. Define Your Allocation Rule

  • Name your rule (e.g., SharedHubAllocation).
  • Select Sources:
    • Choose the scope where the shared costs reside.
    • Example: Subscription = Networking-Shared, or Tag = SharedService:True.
  • Select Targets:
    • Choose where the costs will be reallocated.
    • Example: Subscription = AppTeam1, AppTeam2, or Tag = Department.

4. Set Allocation Percentages

Choose how to split the costs among the targets:

  • πŸ”’ Evenly: Equal share for each target.
  • πŸ“Š By total cost: Based on how much each target is already spending.
  • πŸ–₯️ By resource type: Use ratios of compute, storage, or network usage.
  • ✍️ Custom: Manually enter a percentage for each target (must total 100%).

⏱ Azure shows a preview based on current month data and applies the split to all costs in the source scope unless restricted by unsupported cost types (see below).


5. Save and Apply

  • Click Create.
  • Allocation rules take effect within 24 hours.
  • Revisit the rule anytime to edit, disable, or delete it.

πŸ” How to Verify Allocated Costs

  1. Go to Cost Management > Cost Analysis.
  2. Set the view to β€œAllocated cost”.
  3. In the target scopes (subscriptions, RGs, or tags), you will see a new line item labeled: vbnetCopyEditAllocated Cost – from Networking-Shared

The source scope’s cost will drop to near zero in cost analysis views (since it was reallocated).


🧠 Notes and Best Practices

TopicNotes
Billing ImpactAllocations are only for reporting. Invoices remain unchanged.
Unsupported CostsReservation purchases, marketplace, and support plans can’t be reallocated.
Rule OrderRules run sequentially in creation order. If a source’s cost is already reallocated, a later rule won’t apply.
Cross-Tag AllocationYou can reallocate from one tag value (e.g., Shared: True) to other tag values (e.g., Department: Marketing, HR).
Historical MonthsReallocation applies to the current billing period and forward. To backfill prior months, re-create the rule with a backdated start.
Disabling a RuleRemoves allocation; costs return to the original source scope in reports.

🧾 Example

You have a Networking-Shared subscription with $1,000/month in shared costs.

You create a rule:

  • Source: Subscription Networking-Shared
  • Targets:
    • AppTeam1 = 40%
    • AppTeam2 = 60%

After applying the rule:

  • Networking-Shared shows $0 in reports.
  • AppTeam1 shows $400 in Allocated Cost.
  • AppTeam2 shows $600 in Allocated Cost.

πŸ“ˆ Why It Matters

Using Azure Cost Allocation:

  • Encourages accountability: Teams see shared costs in their dashboards.
  • Eliminates spreadsheets and manual splitting.
  • Enables accurate showback/chargeback in Power BI or internal reports.
  • Supports FinOps best practices by centralizing governance while distributing financial awareness.