An administrator manages an Azure environment that contains a management group named MG-Engineering and a subscription named Sub-Dev-01. Sub-Dev-01 contains a resource group named rg-shared-testing. Inside rg-shared-testing, you have a storage account named storedata99 and five virtual machines used for daily testing. You need to configure the environment to meet the following requirements:
1. Automatically deallocate the virtual machines when the monthly cost of Sub-Dev-01 exceeds 100% of its budgeted limit.
2. Prevent users from deleting storedata99, while allowing them to create, modify, and delete the virtual machines.
Which two actions should you perform?
- Create a budget for Sub-Dev-01, set the alert threshold to 100%, and configure an Action Group to trigger the VM deallocation runbook.Cevap
- Apply a CanNotDelete lock directly to the storedata99 storage account.Cevap
- CApply a CanNotDelete lock to the rg-shared-testing resource group.
- DCreate a budget for Sub-Dev-01, set the alert threshold to 100%, and define the VM deallocation runbook directly inside the budget settings without creating an Action Group.
Cevap
Create a budget for the subscription with a 100% alert threshold linked to an Action Group that triggers the VM deallocation runbook, and apply a CanNotDelete lock directly to the storage account resource.
Applying a CanNotDelete lock directly to the storage account ensures that only that specific resource is protected from deletion, satisfying the requirement to allow virtual machine deletion. To automate the VM deallocation when the cost threshold is reached, you must associate the budget alert threshold with an Action Group configured to trigger an Automation runbook.
Adım Adım Çözüm
Anahtar Kavram
Resource locks prevent accidental deletion or modification of Azure resources, and their scope inheritance must be managed carefully. Budget alerts require Action Groups to execute automated runbooks.