A company deploys a multi-tier web application to Azure. All resources for the application, including Azure App Service plans and Azure SQL databases, are placed inside a resource group named `rg-webapp-prod`. To track the monthly operational expenditures (OpEx) for this specific application, an administrator applies a tag named `AppID` with a value of `Web-09` to the `rg-webapp-prod` resource group. The individual resources within the resource group do not have any tags applied.
The administrator then runs a cost query in Azure Cost Management filtered by the tag `AppID: Web-09` to analyze the monthly OpEx of the application.
Which of the following will be the outcome of this query?
- The query will return only the costs directly associated with the resource group itself, and not the costs of the individual resources within it.Cevap
- BThe query will return the total cost of all resources within the resource group because resources automatically inherit tags from their parent resource group.
- CThe query will return zero costs because all tag-based cost tracking in Azure Cost Management is restricted to Capital Expenditure (CapEx) accounts.
- DThe query will return the costs of all resources, but the billing engine will automatically reclassify these costs from Operational Expenditure (OpEx) to Capital Expenditure (CapEx).
Cevap
The query will return only the costs directly associated with the resource group itself, and not the costs of the individual resources within it.
The correct answer is correct because Azure resource tags are not inherited by the resources inside a resource group. When a tag is applied to a resource group, it does not apply to the resources within that group. As a result, querying costs by that tag in Azure Cost Management will only return costs associated with the resource group itself (which are typically zero or negligible), and will not return the costs of the untagged resources inside the group.
Adım Adım Çözüm
Anahtar Kavram
Azure resource tags do not automatically inherit from resource groups to resources, and cost queries filtered by tags only retrieve costs for resources that directly carry those tags.