`ScopeLocked: The scope '/subscriptions/.../resourceGroups/rg-shop-prod' cannot perform delete operation because following scope(s) are locked: '/subscriptions/.../resourceGroups/rg-shop-prod'.`
BeginnerTroubleshootingQuota, Deployment and IaC Errors
Answer
Likely causes → A CanNotDelete or ReadOnly lock on the RG or a parent.
Diagnose → az lock list -g rg-shop-prod -o table and at subscription level.
Fix →
- If the delete is intended, remove the lock (needs
Microsoft.Authorization/locks/delete, Owner or User Access Administrator):az lock delete -n no-delete -g rg-shop-prod - Re-add after the change if appropriate
Prevent → Manage locks in IaC so their presence is intentional and visible.
More on Quota, Deployment and IaC Errors
`(QuotaExceeded) Operation could not be completed as it results in exceeding approved standardDSv5Family Cores quota. Location: centralindia, Current Limit: 10, Current Usage: 8, Additional Required: 4, (Minimum) New Limit Required: 12.`Beginner`SkuNotAvailable: The requested VM size Standard_D4s_v5 is currently not available in location 'centralindia' zones '3'.`Intermediate`MissingSubscriptionRegistration: The subscription is not registered to use namespace 'Microsoft.ContainerService'.`Beginner`StorageAccountAlreadyTaken: The storage account named sttfstate is already taken.`Beginner`(VaultAlreadyExists)` or `A vault with the same name already exists in deleted state. You need to either recover or purge existing key vault.`Beginner`DeploymentFailed: At least one resource deployment operation failed. Please list deployment operations for details.` How do you find the real error?Beginner