AZ-104 Question 41
Single answerYou are an Azure Administrator for a company that has multiple subscriptions. The company wants to track usage cost for resources belonging to the Finance department. You need to ensure that all existing and newly created resources receive a 'department' tag with the value 'Finance'. Which approach should you use?
- A
Use Azure Resource Graph Explorer to locate and manually tag existing resources
- B
Create an Azure Policy with an Append effect to set the 'department' tag if it is missing
- C
Use the New-AzTag PowerShell command to bulk update tags on all resource groups
- D
Manually add tags to each resource in the Azure portal whenever they are created
Show answer and explanation
Correct answer: B
Explanation
An Azure Policy with an Append effect is designed to ensure a specific tag is added across all resources, both existing and newly created. This meets the requirement of automatically applying the 'department=Finance' tag to any resource that does not already have it.
- A. Incorrect.
Azure Resource Graph Explorer can help find resources, but it does not enforce tags on newly created resources automatically.
- B. Correct.
Azure Policy with an Append effect can enforce and automatically add the 'department' tag to both existing and new resources.
- C. Incorrect.
Using PowerShell to update tags is a one-time operation, so new resources will not automatically receive the tag.
- D. Incorrect.
Manually adding tags in the portal requires continuous monitoring and is prone to human error, not ensuring uniform policy.