An administrator creates an Azure resource group named `rg-hr-prod` and applies a tag named `Environment: Production` and a `ReadOnly` resource lock to the resource group. The administrator then deploys an Azure Storage account named `storeprod` to `rg-hr-prod`. The administrator attempts to view the tags applied to `storeprod` and retrieve the access keys for `storeprod`. What are the results of these actions?
- The storage account has no tags applied, and the retrieval of the access keys is blocked.Answer
- BThe storage account has the Environment: Production tag applied, and the retrieval of the access keys is blocked.
- CThe storage account has no tags applied, and the access keys are successfully retrieved.
- DThe storage account has the Environment: Production tag applied, and the access keys are successfully retrieved.
Answer
The storage account has no tags applied, and the retrieval of the access keys is blocked.
The correct answer is that the storage account has no tags applied and the retrieval of the access keys is blocked. This is because tags on resource groups do not propagate to the resources inside them. Furthermore, the ReadOnly lock applies to all resources in the group by inheritance. Listing storage access keys is treated as a POST action by the Azure Resource Manager API, which is blocked by the ReadOnly lock.
Step-by-Step Solution
Key Concept
Resource locks of type ReadOnly block operations that modify resources or invoke POST actions (like listing keys), and tags applied to resource groups do not automatically propagate to child resources.
Estimated Time:1m 30s