# Virtual Tags

## Overview

Virtual Tags in OneLens empower you to assign cost allocation logic beyond native cloud provider tagging - whether you're on AWS, Azure, GCP, or OCI.. You can fill gaps where tags are missing, incorrectly applied, or entirely unsupported - so your financial reporting reflects your true business structure.

Whether you’re mapping untagged resources, allocating shared expenses, or grouping untaggable items like discounts and savings plans, Virtual Tags give you the flexibility to define cost your way.

## What You Can Tag

You can use Virtual Tags to assign cost in the following scenarios:

* #### Missed Tagged Spend

Capture resources that should have been tagged but weren’t - due to human error, late tagging, or tag propagation issues.

* #### Untagged Costs

Assign cost to resources that never had any tags applied.

* #### Untaggable Costs

Apply tags to services or line items that are not taggable through cloud-native methods.

**Examples of untaggable services and line items:**

<table><thead><tr><th width="152.5"> Category</th><th width="464">Examples</th></tr></thead><tbody><tr><td>Services</td><td>Data Transfer, RDS Backups</td></tr><tr><td>Line Items</td><td>Discounts, Credits, Savings Plans, Refunds, Reservations, Out-of-cycle Adjustments</td></tr></tbody></table>

## How to Create a Virtual Tag

Follow the steps below to create your own Virtual Tags:

{% stepper %}
{% step %}
Go to **Settings** in the left sidebar.
{% endstep %}

{% step %}
Under **Business Mapping**, open **Organization Cost Center**.

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FLQYECZiT8dUgz0kXge2e%2FScreenshot%202025-07-25%20at%2011.03.34.png?alt=media&#x26;token=6d741f3a-4e11-48aa-b31a-a053898794df" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Switch to the **Virtual Tags** tab.

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2F3HpHYLlWjIh3fnYdjoYH%2FScreenshot%202025-07-25%20at%2011.04.37.png?alt=media&#x26;token=4d3843c5-1456-4666-9312-453c859bd2ae" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click **Create Virtual Tag**.

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FejSl5nBlOl6LuoqRw4C8%2FScreenshot%202025-07-25%20at%2011.05.56.png?alt=media&#x26;token=0d4e4561-fee3-47c1-9002-ad2d22396bfb" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Enter a **Key** (name of the tag) and an optional **Description**. After that click **Define Value** at the bottom right.

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FpOCU1yGoS7dqhQfreYkt%2FScreenshot%202025-07-25%20at%2011.08.03.png?alt=media&#x26;token=328d08f5-875f-4347-81a6-7dbee10095d5" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
&#x20;Set the cost mapping values and conditions.

Learn how to [#defining-values](#defining-values "mention").&#x20;

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FR60fE0H77MjpopGplY2x%2FScreenshot%202025-07-25%20at%2011.29.05.png?alt=media&#x26;token=436bbf47-8cdf-44ba-aad5-b11ffd7c1d57" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click **Create Virtual Tag** (bottom right).
{% endstep %}
{% endstepper %}

The tag is now created.&#x20;

{% hint style="warning" %}

## Note

It takes up to **24 hours** for cost data to sync with the tag.Once synced, you can start using the tag in **Cost Altas** to slice, filter, and group cost based on your custom logic.
{% endhint %}

## Defining Values

When you create a **Virtual Tag**, you're essentially building your own rule-based cost mapping system. This lets you assign a **value** to specific resources - even if they have no native tags.

You do this by creating **conditions** that determine **which resources get mapped** to which **tag value**. Once the conditions are met, OneLens automatically maps the associated cost to that value - so you can track, report, and allocate cost in a way that aligns with how you view your business.

{% hint style="info" %}

## Use Case

**For example:**\
If you run all S3 workloads for data analytics in the `us-west-2` region, you can create a virtual tag value called **Data Analytics - S3** and map it to:

* **Field:** `Service` → **Operator:** `Is` → **Value:** `S3`
* **Field:** `Region` → **Operator:** `Is` → **Value:** `us-west-2`

All matching S3 charges will now be grouped under **Data Analytics - S3 -** even if they weren’t tagged that way in AWS.

<img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FFXlofHlDB7MOFJraePvw%2Fimage.png?alt=media&#x26;token=c349cd96-e291-414c-bc35-bd64831d9206" alt="" data-size="original">
{% endhint %}

You can add multiple conditions to create fine-tuned cost mappings.

### How to Set Conditions

#### Step 1: Choose Field

Select the attribute you want to match your condition against. Each field represents a dimension of the resource or billing data.

<details>

<summary>Available Fields</summary>

<table><thead><tr><th width="113">Cloud</th><th width="194">Group By Option</th><th width="311">Description</th></tr></thead><tbody><tr><td>AWS</td><td><strong>Account</strong></td><td>AWS account.</td></tr><tr><td>AWS</td><td><strong>API Operation</strong></td><td>Specific API operations performed.</td></tr><tr><td>AWS</td><td><strong>Availability Zone</strong></td><td>AWS Availability Zone where resources are deployed.</td></tr><tr><td>AWS</td><td><strong>Billing Entity</strong></td><td>Billing entity associated with the usage.</td></tr><tr><td>AWS</td><td><strong>Charge Type</strong></td><td>Charge classification such as usage, recurring, or one-time fees.</td></tr><tr><td>AWS</td><td><strong>Cost Center</strong></td><td>Assigned cost center.</td></tr><tr><td>AWS</td><td><strong>Cost Center Category</strong></td><td>Defined cost center categories.</td></tr><tr><td>AWS</td><td><strong>Database Engine</strong></td><td>Database engine type (e.g., MySQL, PostgreSQL).</td></tr><tr><td>AWS</td><td><strong>Instance Type</strong></td><td>EC2 or database instance type.</td></tr><tr><td>AWS</td><td><strong>Legal Entity</strong></td><td>Legal entity associated with the account.</td></tr><tr><td>AWS</td><td><strong>Platform</strong></td><td>Operating system or platform type.</td></tr><tr><td>AWS</td><td><strong>Purchase Option</strong></td><td>Reserved, on-demand, or other purchase options.</td></tr><tr><td>AWS</td><td><strong>Region</strong></td><td>AWS region.</td></tr><tr><td>AWS</td><td><strong>Resource</strong></td><td>Individual resource identifiers.</td></tr><tr><td>AWS</td><td><strong>Service</strong></td><td>AWS service.</td></tr><tr><td>All clouds</td><td><strong>Tag</strong></td><td>User-defined tags.</td></tr><tr><td>AWS</td><td><strong>Tenancy</strong></td><td>Resource tenancy (shared or dedicated).</td></tr><tr><td>AWS</td><td><strong>Usage Type</strong></td><td>AWS usage type classification.</td></tr><tr><td>All clouds</td><td><strong>Virtual Tag</strong></td><td>Virtual tags created in OneLens for additional categorization.</td></tr><tr><td>Azure</td><td><strong>Benefit Name</strong></td><td>Applied reservation or savings plan name.</td></tr><tr><td>Azure</td><td><strong>Charge Type</strong></td><td>Cost record type classification (usage, purchase, refund)</td></tr><tr><td>Azure</td><td><strong>Frequency</strong></td><td>Billing recurrence indicator</td></tr><tr><td>Azure</td><td><strong>Meter</strong></td><td>Unique billing meter identifier</td></tr><tr><td>Azure</td><td><strong>Meter Category</strong></td><td>Top-level Azure service classification</td></tr><tr><td>Azure</td><td><strong>Meter Subcategory</strong></td><td>Azure service feature or tier breakdown</td></tr><tr><td>Azure</td><td><strong>Partner Name</strong></td><td>CSP or reseller partner identifier</td></tr><tr><td>Azure</td><td><strong>Pricing Model</strong></td><td>Billing arrangement type (on-demand, reservation, spot)</td></tr><tr><td>Azure</td><td><strong>Product</strong></td><td>Purchased Azure product or SKU name</td></tr><tr><td>Azure</td><td><strong>Product Order Name</strong></td><td>Enrollment or order grouping label</td></tr><tr><td>Azure</td><td><strong>Provider</strong></td><td>Infrastructure provider type</td></tr><tr><td>Azure</td><td><strong>Publisher Name</strong></td><td>Marketplace or service publisher identity</td></tr><tr><td>Azure</td><td><strong>Publisher Type</strong></td><td>Publisher origin classification (Microsoft, third-party)</td></tr><tr><td>Azure</td><td><strong>Resource Group Name</strong></td><td>Azure resource group container name</td></tr><tr><td>Azure</td><td><strong>Resource Location</strong></td><td>Deployed Azure region or datacenter</td></tr><tr><td>Azure</td><td><strong>Resource Type</strong></td><td>Azure ARM resource type identifier</td></tr><tr><td>Azure</td><td><strong>Service Family</strong></td><td>High-level Azure service grouping (Compute, Storage, Networking)</td></tr><tr><td>Azure</td><td><strong>Subscription</strong></td><td>Azure billing subscription scope</td></tr><tr><td>GCP</td><td><strong>Cost Type</strong></td><td>Charge classification (regular, tax, credit, adjustment)</td></tr><tr><td>GCP</td><td><strong>Country</strong></td><td>Billing or usage geographic country</td></tr><tr><td>GCP</td><td><strong>Folders</strong></td><td>GCP resource hierarchy folder path</td></tr><tr><td>GCP</td><td><strong>Labels</strong></td><td>User-defined key-value resource tags</td></tr><tr><td>GCP</td><td><strong>Location</strong></td><td>GCP multi-region or location grouping</td></tr><tr><td>GCP</td><td><strong>Organization</strong></td><td>GCP organization-level billing entity</td></tr><tr><td>GCP</td><td><strong>Project</strong></td><td>GCP project scope for cost attribution</td></tr><tr><td>GCP</td><td><strong>Region</strong></td><td>GCP compute region identifier</td></tr><tr><td>GCP</td><td><strong>Resource Global Name</strong></td><td>Fully-qualified GCP resource URI</td></tr><tr><td>GCP</td><td><strong>Resource Name</strong></td><td>Short display name of provisioned resource</td></tr><tr><td>GCP</td><td><strong>Seller</strong></td><td>Cost origin classification (Google, third-party reseller)</td></tr><tr><td>GCP</td><td><strong>Service</strong></td><td>GCP product service name (Compute Engine, BigQuery, etc.)</td></tr><tr><td>GCP</td><td><strong>SKU</strong></td><td>Granular billable unit or pricing item identifier</td></tr><tr><td>GCP</td><td><strong>System Labels</strong></td><td>Google-managed automatic metadata labels</td></tr><tr><td>GCP</td><td><strong>Zone</strong></td><td>GCP availability zone within a region</td></tr><tr><td>OCI</td><td><strong>Availability Domain</strong></td><td>OCI datacenter within a region</td></tr><tr><td>OCI</td><td><strong>Compartment ID</strong></td><td>Unique identifier for OCI resource compartment</td></tr><tr><td>OCI</td><td><strong>Compartment Name</strong></td><td>Logical resource grouping container name</td></tr><tr><td>OCI</td><td><strong>Product Description</strong></td><td>OCI service or feature display name</td></tr><tr><td>OCI</td><td><strong>Product SKU</strong></td><td>Billable product pricing unit identifier</td></tr><tr><td>OCI</td><td><strong>Region</strong></td><td>OCI deployed datacenter region</td></tr><tr><td>OCI</td><td><strong>Resource ID</strong></td><td>Unique OCID of the provisioned resource</td></tr><tr><td>OCI</td><td><strong>Service</strong></td><td>Top-level OCI service classification (Compute, Object Storage, etc.)</td></tr><tr><td>OCI</td><td><strong>Subscription</strong></td><td>OCI billing subscription or contract scope</td></tr><tr><td>OCI</td><td><strong>Tenant ID</strong></td><td>OCI tenancy-level billing entity identifier</td></tr></tbody></table>

</details>

#### Step 2: Choose Operator

Operators define how the field value should match the input you provide.

<details>

<summary>Available Operators</summary>

| **Contains**            | Matches if the field includes the specified text.            |
| ----------------------- | ------------------------------------------------------------ |
| **Does Not Contain**    | Matches if the field excludes the specified text.            |
| **Starts With**         | Matches if the field begins with the specified text.         |
| **Does Not Start With** | Matches if the field does not begin with the specified text. |
| **In**                  | Matches if the field is one of the listed values.            |
| **Is Not In**           | Matches if the field is not in the list of values.           |
| **Is Null**             | Matches if the field has no value.                           |
| **Is Not Null**         | Matches if the field has any value (i.e., not empty).        |

</details>

#### Step 3: Enter Value

Provide the value(s) you want OneLens to match. You can:

* Choose one or more values for operators like `In` or `Is Not In`
* Enter strings or substrings for operators like `Contains` and `Starts With`

You can continue adding more **fields and conditions** to refine how the tag applies.

{% hint style="success" %}

## Verifying Resources

Once you’ve defined a value, OneLens lets you **verify the resources** that match the logic before finalizing. This helps ensure your mapping works as expected.

<img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FEWblK29WOaXxQcim393k%2FScreenshot%202025-07-25%20at%2011.33.30.png?alt=media&#x26;token=b4faaf21-8d4e-4566-bbe1-1b0fd8f610bd" alt="" data-size="original">
{% endhint %}

#### Step 3: Allocating Shared Costs

Virtual Tags can also be used to allocate **shared costs** like support charges, data transfer, or common infrastructure across business units.\
➡️ Learn more about [shared-cost-allocation](https://docs.onelens.cloud/observe-visibility-and-insights/cost-allocation/virtual-tags/shared-cost-allocation "mention")

{% hint style="info" %}

## **Note**&#x20;

**Allocating cost is optional**—you can choose to use virtual tags purely for grouping or visibility purposes without impacting cost allocation.
{% endhint %}

### Value Status Guide

Each value inside a Virtual Tag passes through a lifecycle status to help you track its readiness.

| Status          | What It Means                                                                 |
| --------------- | ----------------------------------------------------------------------------- |
| **Not Defined** | You’ve created the value, but no resources are mapped yet.                    |
| **Defined**     | Resources have been mapped to the value, and associated costs are identified. |
| **Allocated**   | The value is used in your cost hierarchy and cost is allocated accordingly.   |

{% hint style="success" %}
A value is usable in Cost Atlas as soon as it is **Defined**. Allocation is optional.
{% endhint %}

## Managing Virtual Tags

All your created tags are listed in the **Virtual Tags** tab.

You can manage any tag using the menu on the right of each row:

* **Manage** — Edit values, logic, or name.
* **Delete** — Remove the tag if it's no longer needed

  <figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FS7nv1dOuAYMosHal4llP%2FScreenshot%202025-07-25%20at%2011.50.21.png?alt=media&#x26;token=cba008ea-2950-4cc5-8ae9-8f1cda5dd25d" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Once the tag has synced, a **View in Cost Atlas** button appears. Clicking it will open a predefined view showing costs associated with the tag.
{% endhint %}
