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
description: This article provides information on how to track the cost of your lab through Azure Cost Management
3
+
description: This article provides information on how to track the cost of your lab through Azure Cost Management.
4
4
ms.topic: how-to
5
5
ms.author: rosemalcolm
6
6
author: RoseHJM
@@ -9,26 +9,26 @@ ms.custom: UpdateFrequency2
9
9
---
10
10
11
11
# Track costs associated with a lab in Azure DevTest Labs
12
-
This article provides information on how to track the cost of your lab through [Azure Cost Management](../cost-management-billing/cost-management-billing-overview) by applying tags to the DevTest Lab to filter costs. DevTest Labs may create additional resource groups for resources related to the lab (depending on the features used and the settings of the lab). For this reason, it’s often not straightforward to get a view of the total costs for a lab just by looking at Resource Groups. To create a single view of costs per lab, tags are used.
12
+
This article provides information on how to track the cost of your lab through [Azure Cost Management](../cost-management-billing/cost-management-billing-overview) by applying tags to the DevTest Lab to filter costs. DevTest Labs may create more resource groups for resources related to the lab (depending on the features used and the settings of the lab). For this reason, it’s often not straightforward to get a view of the total costs for a lab just by looking at Resource Groups. To create a single view of costs per lab, tags are used.
13
13
14
14
## Steps to Leverage Cost Management for DevTest Labs
15
15
16
-
These are the steps needed to leverage cost management for DevTest Labs, more details are captured below.
16
+
These are the steps needed to use cost management for DevTest Labs. More details are captured in the following sections.
17
17
1. Enable tag inheritance for costs
18
-
1. Apply tags to the DevTest Labs (cost center, business unit, etc)
18
+
1. Apply tags to the DevTest Labs (cost center, business unit, etc.)
19
19
1. Provide permissions to allow users to view costs
20
20
1. Use Azure Cost Management for viewing/filtering costs for DevTest Labs, based on the tags
21
21
22
22
## Step 1: Enable Tag Inheritance for Tags on Resource Groups
23
23
24
-
When DevTest Labs creates [environments](devtest-lab-create-environment-from-arm.md), these are each placed in their own resource group. To ensure that the DevTest Lab tags flow down (for billing purposes) from the resource group to the resources, it’s required to enable tag inheritance.
24
+
When DevTest Labs creates [environments](devtest-lab-create-environment-from-arm.md), these are each placed in their own resource group. To ensure that the DevTest Lab tags flow down (for billing purposes) from the resource group to the resources, tag inheritance must be enabled.
25
25
26
26
This can be done either with billing properties OR via Azure Policies. The first method (billing properties) is the easiest & fastest if it doesn’t affect billing reporting for other resources in the same subscription.
27
27
28
28
-[Group and allocate costs using tag inheritance](../cost-management-billing/costs/enable-tag-inheritance)
29
-
-[Use the “Inherit a tag from the resource group” Azure Policy](../azure-resource-manager/management/tag-policies)
29
+
-[Use the "Inherit a tag from the resource group" Azure Policy](../azure-resource-manager/management/tag-policies)
30
30
31
-
If updated correctly using the first method above, you will see that Tag Inheritance now shows **Enabled**:
31
+
If updated correctly using the first method, you see that Tag Inheritance now shows **Enabled**:
32
32
33
33

34
34
@@ -38,29 +38,29 @@ DevTest Labs automatically propagates tags applied at the lab level to the resou
38
38
39
39

40
40
41
-
It’s important to remember that tags are propagated for any resources created _after_ the tag has been applied to the DevTest Lab. If there are _existing resources_ that must be updated with the new tags, there is a script available to propagate the new/updated tags correctly. If you have existing resources and want to apply the lab tags, please use the [Update-DevTestLabsTags script located in the DevTest Labs GitHub Repo](https://github.com/Azure/azure-devtestlab/tree/phauge/update-dtl-tags/samples/DevTestLabs/Scripts/UpdateDtlTags).
41
+
It’s important to remember that tags are propagated for any resources created _after_ the tag has been applied to the DevTest Lab. If there are _existing resources_ that must be updated with the new tags, there's a script available to propagate the new/updated tags correctly. If you have existing resources and want to apply the lab tags, use the [Update-DevTestLabsTags script located in the DevTest Labs GitHub Repo](https://github.com/Azure/azure-devtestlab/tree/phauge/update-dtl-tags/samples/DevTestLabs/Scripts/UpdateDtlTags).
42
42
43
43
## Step 3: Provide permissions to allow users to view costs
44
44
45
-
DevTest Labs users don’t automatically have permission to view costs for their resources via Cost Management. There is an additional step to [enable users to view billing information](../cost-management-billing/costs/assign-access-acm-data#assign-billing-account-scope-access), which is to assign the _Billing Reader_ permission to users at the subscription level (if they don’t already have permissions that include Billing Reader access). More information is found here on managing access to billing information: [Manage access to Azure billing - Microsoft Cost Management](../cost-management-billing/manage/manage-billing-access)
45
+
DevTest Labs users don’t automatically have permission to view costs for their resources via Cost Management. There's one more step to [enable users to view billing information](../cost-management-billing/costs/assign-access-acm-data#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. More information is found here on managing access to billing information: [Manage access to Azure billing - Microsoft Cost Management](../cost-management-billing/manage/manage-billing-access)
46
46
47
47
## Step 4: Use Azure Cost Management for viewing/filtering costs for DevTest Labs
48
48
49
-
Now that DevTest Labs has been configured to provide the lab-specific information for Cost Management, please start here on Cost Management Reporting to view costs: Get started with [Cost Management reporting - Azure - Microsoft Cost Management](../cost-management-billing/costs/reporting-get-started). You can visualize the costs in the Azure Portal, download cost reporting information, or use PowerBI to visualize the costs.
49
+
Now that DevTest Labs is configured to provide the lab-specific information for Cost Management, start here on Cost Management Reporting to view costs: Get started with [Cost Management reporting - Azure - Microsoft Cost Management](../cost-management-billing/costs/reporting-get-started). You can visualize the costs in the Azure Portal, download cost reporting information, or use PowerBI to visualize the costs.
50
50
51
-
For a quick view of costs per lab, please follow the following steps:
51
+
For a quick view of costs per lab, see the following steps:
52
52
53
53
1. Select **Cost Management** and then on **Cost analysis**
54
54
1. Select **Daily Costs**
55
55

56
-
1. On the **Custom: Cost Analysis** page, select the **Group By** filter, choose **Tag** and then the Tag Name (like “CostCenter”) to group by
56
+
1. On the **Custom: Cost Analysis** page, select the **Group By** filter, choose **Tag** and then the Tag Name (like "CostCenter") to group by
57
57

58
58
59
-
The resulting view will show costs in the subscription grouped by the ‘tag’ (which is grouping by the lab & it’s resources).
59
+
The resulting view shows costs in the subscription grouped by the tag (which is grouping by the lab & its resources).
60
60
61
61
## Related content
62
62
63
-
-[Define lab policies](devtest-lab-set-lab-policy.md). Learn how to set the various policies used to govern how your lab and its VMs are used.
63
+
-[Define lab policies](devtest-lab-set-lab-policy.md). Learn how to set the various policies used to govern how your lab and its virtual machines (VMs) are used.
64
64
-[Create custom image](devtest-lab-create-template.md). When you create a VM, you specify a base. The base can be either a custom image or a Marketplace image. This article describes how to create a custom image from a VHD file.
65
65
-[Configure Marketplace images](devtest-lab-configure-marketplace-images.md). DevTest Labs supports creating VMs based on Azure Marketplace images. This article illustrates how to specify Azure Marketplace images you can use when creating VMs in a lab.
66
66
-[Create a VM in a lab](devtest-lab-add-vm.md). This article illustrates how to create a VM from a custom or Marketplace base image, and work with artifacts in the VM.
0 commit comments