You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Track costs associated with a lab in Azure DevTest Labs
3
-
description: Track the cost of your lab through Microsoft Cost Management with custom tags, tag inheritance, and filtered views.
2
+
title: Track Costs Associated with a Lab in Azure DevTest Labs
3
+
description: Track the cost of your lab by using Microsoft Cost Management and custom tags, tag inheritance, and filtered views.
4
4
ms.topic: how-to
5
5
ms.author: rosemalcolm
6
6
author: RoseHJM
7
-
ms.date: 06/03/2024
7
+
ms.date: 07/18/2025
8
8
ms.custom: UpdateFrequency2
9
9
10
10
#customer intent: As a developer, I want to use Microsoft Cost Management to track and manage the costs associated with my DevTest Labs resources.
11
11
---
12
12
13
13
# Track costs associated with a lab in Azure DevTest Labs
14
14
15
-
This article provides information on how to track the cost of your lab through [Microsoft Cost Management](../cost-management-billing/cost-management-billing-overview.md) by applying tags to the lab to filter costs.
15
+
This article provides information on how to track the cost of your lab by applying tags to the lab to filter costs so that you can use [Microsoft Cost Management](../cost-management-billing/cost-management-billing-overview.md).
16
16
17
-
DevTest Labs can create extra resource groups for resources related to your lab. The number of resource groups created depends on the features used by the lab and their settings. Because of the extra resource groups, it's often not straightforward to get a view of the total costs for your lab just by looking at **Resource groups** in the Azure portal. To create a single view of costs per lab in the Azure portal, you can use resource group **Tags**.
17
+
DevTest Labs can create extra resource groups for resources related to your lab. The number of resource groups created depends on the features used by the lab and their settings. Because of the extra resource groups, it's not always easy to get a view of the total costs for your lab just by looking at **Resource groups** in the Azure portal. To create a single view of costs per lab in the Azure portal, you can use resource group **Tags**.
18
18
19
19
## Apply Cost Management for DevTest Labs
20
20
21
-
The process for using cost management for DevTest Labs involves four steps:
21
+
The process for using Cost Management for DevTest Labs includes four steps:
22
22
23
23
1. Create tags and enable tag inheritance in the Azure portal.
24
24
1. Apply the tags to your DevTest Labs resources.
25
25
1. Provide permissions to allow users to view their resource costs.
26
-
1. Use Microsoft Cost Management to view and filter costs for your DevTest Labs resources, based on your tags.
26
+
1. Use Cost Management to view and filter costs for your DevTest Labs resources, based on your tags.
27
27
28
28
You might create tags to allow users to track billed charges by cost center, business unit, team project, and so on.
29
29
@@ -33,54 +33,54 @@ The details for these steps are described in the following sections.
33
33
34
34
When DevTest Labs creates [environments](devtest-lab-create-environment-from-arm.md), it places each environment in its own resource group. For billing purposes, you must enable tag inheritance to ensure the lab tag definitions flow down from the resource group to the resources.
35
35
36
-
You can enable tag inheritance through billing properties or through Azure Policies. The billing properties method is the easiest and fastest to configure. However, it might affect billing reporting for other resources in the same subscription.
36
+
You can enable tag inheritance by using billing properties or by using Azure Policy. The billing properties method is the easiest and fastest. However, it might affect billing reporting for other resources in the subscription.
37
37
38
38
The following articles describe how to create tags and enable tag inheritance:
39
39
40
-
-[Group and allocate costs by using tag inheritance](../cost-management-billing/costs/enable-tag-inheritance.md)
40
+
-[Group and allocate costs by using tag inheritance in billing properties](../cost-management-billing/costs/enable-tag-inheritance.md)
41
41
-[Use the "Inherit a tag from the resource group" Azure Policy](../azure-resource-manager/management/tag-policies.md)
42
42
43
-
If the lab is updated correctly by using the billing properties method, you see **Tag inheritance** is **Enabled**:
43
+
If the lab is updated correctly by using the billing properties method, you can see that **Tag inheritance** is **Enabled** on the Cost Management **Configuration** page:
44
44
45
-
:::image type="content" source="./media/devtest-lab-configure-cost-management/devtest-tag-inheritance.png" alt-text="Screenshot that shows Tag Inheritance is Enabled for cost management in the Azure portal." lightbox="./media/devtest-lab-configure-cost-management/devtest-tag-inheritance-large.png":::
45
+
:::image type="content" source="./media/devtest-lab-configure-cost-management/devtest-tag-inheritance.png" alt-text="Screenshot that shows that Tag inheritance is Enabled for Cost Management in the Azure portal." lightbox="./media/devtest-lab-configure-cost-management/devtest-tag-inheritance.png":::
46
46
47
47
## Apply tags to DevTest Labs
48
48
49
-
DevTest Labs automatically propagates tags applied at the lab level to resources created by the lab. For virtual machines, tags are applied to the billable resources. For environments, tags are applied to the resource group for the environment. To apply tags to your labs, follow the steps in [Add tags to a lab](devtest-lab-add-tag.md).
49
+
DevTest Labs automatically propagates tags applied at the lab level to resources created by the lab. For virtual machines, tags are applied to the billable resources. For environments, tags are applied to the resource group for the environment. To apply tags to your labs, complete the steps in [Add tags to a lab](devtest-lab-add-tag.md).
50
50
51
-
:::image type="content" source="./media/devtest-lab-configure-cost-management/devtest-tags.png" alt-text="Screenshot that shows tags added for a DevTest Labs resource in the Azure portal." lightbox="./media/devtest-lab-configure-cost-management/devtest-tags-large.png":::
51
+
:::image type="content" source="./media/devtest-lab-configure-cost-management/devtest-tags-large.png" alt-text="Screenshot that shows tags added for a DevTest Labs resource in the Azure portal." lightbox="./media/devtest-lab-configure-cost-management/devtest-tags-large.png":::
52
52
53
53
> [!NOTE]
54
-
> After you apply a new tag to your lab, the tag is automatically applied to new lab resources when they're created. If you want to apply a new or updated tag to existing resources, you can use a script to propagate the tag correctly. Use the [Update-DevTestLabsTags script](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/Scripts/UpdateDtlTags)located in the DevTest Labs GitHub repository.
54
+
> After you apply a new tag to your lab, the tag is automatically applied to new lab resources when they're created. If you want to apply a new or updated tag to existing resources, you can use a script to propagate the tag correctly. Use the [Update-DevTestLabsTags script](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/Scripts/UpdateDtlTags)that's in the DevTest Labs GitHub repository.
55
55
56
56
## Provide permissions to view costs
57
57
58
58
DevTest Labs users don't automatically have permission to view costs for their resources by using Cost Management. To add the permissions, follow the instructions in [enable users to view billing information](../cost-management-billing/costs/assign-access-acm-data.md#assign-billing-account-scope-access). Assign the _Billing Reader_ permission to users at the subscription level, if they don't already have permissions that include Billing Reader access.
59
59
60
-
For more information, see [Manage access to Azure billing - Microsoft Cost Management](../cost-management-billing/manage/manage-billing-access.md).
60
+
For more information, see [Manage access to Azure billing](../cost-management-billing/manage/manage-billing-access.md).
61
61
62
62
## View and filter costs
63
63
64
-
After DevTest Labs is configured to provide the lab-specific information for Microsoft Cost Management, you're ready to get started with [Cost Management reporting - Azure - Microsoft Cost Management](../cost-management-billing/costs/reporting-get-started.md). You can visualize the costs in the Azure portal, download cost reporting information, or use Power BI to visualize the costs.
64
+
After DevTest Labs is configured to provide the lab-specific information for Cost Management, you're ready to get started with [Cost Management reporting](../cost-management-billing/costs/reporting-get-started.md). You can visualize the costs in the Azure portal, download cost reporting information, or use Power BI to visualize the costs.
65
65
66
-
For a quick view of costs per lab, following these steps:
66
+
For a quick view of costs per lab, complete these steps:
67
67
68
-
1. In the [Azure portal](https://portal.azure.com), go to your lab, and select a resource group that has tags.
68
+
1. In the [Azure portal](https://portal.azure.com), go to your lab and select a resource group that has tags.
69
69
70
-
1.On the left menu, expand **Cost Management**, and select **Cost analysis**.
70
+
1.In the left pane, expand **Cost Management** and select **Cost analysis**.
71
71
72
-
1.In the **Cost analysis** page, expand the **View**dropdown list, and select **Daily Costs**:
72
+
1.On the **Cost analysis** page, in the **View** list, select **Daily Costs**:
73
73
74
74
:::image type="content" source="./media/devtest-lab-configure-cost-management/daily-costs.png" alt-text="Screenshot that shows how to view daily costs for resources in the Azure portal." lightbox="./media/devtest-lab-configure-cost-management/daily-costs-large.png":::
75
75
76
76
1. On the **Cost Analysis** page, expand the **Group By** filter, select **Tag**, and then select one of your applied tags:
77
77
78
78
:::image type="content" source="./media/devtest-lab-configure-cost-management/group-by-tag.png" border="false" alt-text="Screenshot that shows how to change the Group by filter to show cost details based on applied tags.":::
79
79
80
-
The updated view shows costs in the subscription grouped by the tag according to the lab its resources. For more information, see the [documentation on group and filter options in Cost Management](../cost-management-billing/costs/group-filter.md).
80
+
The updated view shows costs in the subscription grouped by the tag according to the lab resources. For more information, see [Group and filter options in Cost Analysis and Budgets](../cost-management-billing/costs/group-filter.md).
81
81
82
82
## Related content
83
83
84
84
-[Use tags to organize your Azure resources and management hierarchy](/azure/azure-resource-manager/management/tag-resources)
85
-
- Review the [resource naming and tagging decision guide - Cost management and optimization](/azure/cloud-adoption-framework/ready/azure-best-practices/resource-naming-and-tagging-decision-guide)
85
+
-[Review the resource naming and tagging decision guide](/azure/cloud-adoption-framework/ready/azure-best-practices/resource-naming-and-tagging-decision-guide)
0 commit comments