Virtual Tagging
Apply cost allocation tags in CostBeacon without touching your Azure resources.
Overview
Virtual tagging lets you allocate costs without modifying Azure tags on the resources themselves. Tags exist only within CostBeacon, so there is no risk of disrupting automation or policies that depend on your existing Azure tag structure.
How It Works
Virtual tags are applied through pattern matching. CostBeacon evaluates each resource against your rules using:
- Resource name — match by prefix, suffix, or contains
- Resource type — target specific Azure resource types
- Resource group — match by resource group name
Creating Rules
Each virtual tagging rule specifies:
- Tag key — the virtual tag name (e.g. “Team”)
- Tag value — the value to assign (e.g. “Platform”)
- Match type — how the pattern is evaluated (prefix, suffix, contains, exact)
- Priority — determines which rule wins when multiple rules match
Priority System
When multiple rules match a resource, the rule with the lowest priority number wins. A rule with priority 1 takes precedence over a rule with priority 10. This is a first-match-wins system — once a resource is tagged by a higher-priority rule, lower-priority rules for the same tag key are skipped.
Use Cases
- Cost allocation for shared resources — attribute shared infrastructure costs to the teams that consume them
- Team attribution — tag resources by owning team based on naming conventions, even when Azure tags are missing