You have an Azure subscription that contains a resource group named RG1. RG1 contains 100 virtual machines.
Your company has three cost centers named Manufacturing, Sales, and Finance.
You need to associate each virtual machine to a specific cost center.
What should you do?
Click on the arrows to vote for the correct answer
A. B. C. D.C
https://docs.microsoft.com/en-us/azure/billing/billing-getting-started https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-using-tagsThe correct answer is C. Assign tags to the virtual machines.
To associate each virtual machine to a specific cost center, you can use Azure Resource Manager (ARM) tags. Tags are name/value pairs that can be applied to resources like virtual machines, and they provide a way to logically organize and categorize resources. By using tags, you can quickly identify and filter resources by specific attributes, such as cost center or owner.
To assign tags to your virtual machines, follow these steps:
Once you have assigned tags to your virtual machines, you can use them to filter and group resources in the Azure portal, in Azure Resource Manager templates, and in Azure PowerShell or Azure CLI scripts. For example, you could filter virtual machines by cost center using the following Azure CLI command:
cssaz vm list --query "[?tags.CostCenter=='Sales']"
This command would return a list of all virtual machines in the subscription that have a tag named "CostCenter" with a value of "Sales".