Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions platform-cloud/docs/resource-labels/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,25 +247,37 @@ See [here](https://cloud.google.com/resource-manager/docs/creating-managing-labe

### Azure

The system used for labeling resources in Azure differs depending on your compute environment type:
- In an **Azure Batch** compute environment created with Batch Forge, resource labels are added to the Pool parameters — this adds set of `key=value` **metadata** pairs to the Azure Batch Pool.
- In an **Azure Cloud** (single instance) compute environment, resource labels are propagated to VMs and related resources as **tags**.
The following resources receive the labels associated with the compute environment (either [Batch](../compute-envs/azure-batch.md) or [Cloud](../compute-envs/azure-cloud.md)):

:::warning
In Azure Batch compute environments, the [Azure Batch node pool](https://learn.microsoft.com/en-us/azure/batch/nodes-and-pools) is managed by the compute environment and **resource labels are fixed at the time of creation**.
:::
**Batch**:

- **Compute environment creation time**
- Pool metadata (Azure Batch Pool)

- **Submission time**
- Jobs

- **Execution time**
- Tasks

Static resource labels from the compute environment are written to the Azure Batch Pool `metadata` fields when the compute environment is created, and are also propagated to Azure Batch jobs and tasks at submission and execution time. Resource labels added or overridden when you launch a pipeline are applied only to Azure Batch submission and execution time resources. Dynamic resource labels do not modify the existing Pool metadata.

**Cloud**:

- **Submission and execution time**
- Virtual machines and related resources

#### View costs by resource labels in Azure

Azure supports cost analysis by tags. However, you must configure tag inheritance and cost allocation.
Azure cost analysis by tags applies to Azure Resource Manager resources that support tags, such as Azure Cloud virtual machines and related resources. Azure Batch uses `metadata` pairs rather than Azure Resource Manager tags, so Azure Batch resource labels may have limited or no visibility in Azure Cost Management.

:::note
Dynamic resource labels create tags in the form of metadata pairs on Azure Batch resources. However, Azure's cost reporting integration has some limitations. Azure tags may not always appear immediately in **Cost Management**.
For Azure Batch, both static and dynamic resource labels are added as `key=value` metadata pairs on Azure Batch jobs and tasks. Dynamic resource labels are not applied to the Azure Batch Pool itself. Because Azure Batch uses metadata rather than Azure Resource Manager tags, these labels may not be available for filtering or grouping in **Cost Management**.
:::

**Prerequisites**: Billing profile contributor/owner permissions for billing profile tags, and Contributor role or Tag Contributor role for resource tagging.
**Prerequisites for tag-based Azure cost tracking**: Billing profile contributor/owner permissions for billing profile tags, and Contributor role or Tag Contributor role for resource tagging.

**Steps to enable cost tracking**:
**Steps to enable tag-based cost tracking for Azure-tagged resources**:

1. **Enable Tag Inheritance** (recommended): Navigate to Cost Management in the Azure portal, select a billing account or subscription scope, and under **Settings** > **Configuration** > **Tag inheritance**, enable **Automatically apply subscription and resource group tags to new data**. See [Azure tag inheritance documentation](https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/enable-tag-inheritance) for detailed steps.
2. **View Tagged Costs**: Navigate to **Cost Management + Billing** > **Cost Management** > **Cost analysis** and select **Group by** for your tag key.
Expand Down