Data model
Virtual tags are built from four concepts, resolved in a strict precedence order:
Effective-value precedence (highest wins):
- Manual override
- Imported override
- Matching virtual-tag rule (lowest numeric priority number wins among multiple matches)
- Azure native tag
Rule criteria
Rules support nested condition groups evaluated against inventory resources. All comparisons are case-insensitive.Supported fields
Supported operators
Unknown fields and operators fail closed — the condition evaluates to
false and Flux does not silently ignore the invalid criteria. Empty groups do not match.
Nested conditions
Rules use a group-levelAND / OR combinator. A group can contain individual conditions and child groups, enabling arbitrarily nested logic. For example, you can express:
Legacy rules written with
subscriptionIds, resourceGroups, resourceTypes, regions, nameContains, namePatterns, tagEquals, and tagExists continue to evaluate unchanged. New rules created through the UI use the generalized condition format.Rule lifecycle
1
Preview
Before saving, run a preview. The preview is read-only and returns the affected-resource count, total inventory count, a resource sample, and the current monthly ActualCost for matching resources. No data is changed.
2
Save
Saving creates the rule with
version 1 and appends a rule audit record. Rules require at least one condition, a valid tagKey (1–120 tag-safe characters), and — for include rules — a tagValue.3
Edit / Activate / Deactivate
Any subsequent edit, activation, or deactivation increments the version and appends a new audit record. The full change history is retained.
4
Soft delete
Deleting a rule in the UI sets its status to
inactive. It is reversible — the rule and its audit trail are not destroyed.Effective dates
Rules accept optionaleffectiveFrom and effectiveTo date fields (ISO 8601 date). A rule outside its effective window does not participate in evaluation, even if its status is active. effectiveFrom must not be after effectiveTo.
Rule priority is an integer between 1 and 1000. Among matching include rules, the lowest priority number wins.
Reporting
The Virtual tag showback report provides a governed view of cost allocation by virtual dimension:
Report query parameters:
dimension, value, costType, startDate, endDate.
Historical charge rows are evaluated through current inventory and the current rule set. This is current-state reclassification, not slowly-changing historical tag reconstruction. Charge rows with no resolvable resource are labeled
Unclassified. The report exposes this limitation in its lineage note.Administration
Navigate to Administration → Configuration → Virtual tags to manage:- Dimensions — create or delete reusable business axes.
- Rules — create, preview, edit, activate, deactivate, and soft-delete assignment rules for any dimension.
BusinessRegion dimension without first writing native Azure tags.
API endpoints
Interactive API documentation is available at
/docs.
Ask Flux integration
Ask Flux exposes virtual tag data through theget_virtual_tag_showback governed tool. Questions such as “show amortized cost by BusinessRegion” use the showback report contract rather than any direct database access.
Inventory questions can also pass virtualTagKey and virtualTagValue filter parameters to the governed inventory tool to scope results to resources carrying a specific virtual dimension assignment.
Override import and rollback
Large override sets (for example, enrichment worksheets) can be imported in bulk viaPOST /api/virtual-tags/overrides/import. The import is an idempotent upsert.
Rolling back an import restores the prior value and source for every overridden resource. If a value did not exist before the import, rollback deletes the override. The API uses an optimistic concurrency guard: if a value has been changed since the import was applied, that item is reported as a conflict and is not overwritten silently.
Schema deployment and rollback
Schema initialization for virtual tags is additive:- Creates
virtual_tag_dimensionsif absent. - Adds
virtual_tag_rules.effectwith defaultincludeif absent. - Retains existing rules, audit records, and overrides.
Known limitations
- Historical classification uses current effective tags. Point-in-time assignment snapshots are not yet materialized.
- Meter category and billing scope match only when those fields are present in the evaluated record.
- CSV is the canonical complete export. Native multi-sheet XLSX remains a reporting enhancement.