An Azure personalized recommendation engine that helps users follow best practices to optimize Azure deployments.
Hello hari, It sounds like you're encountering an issue with a resource not being found in the Azure portal, possibly due to it being removed, renamed, or temporarily unavailable.
The "resource removed" error occurs when Azure Resource Manager (ARM) cannot locate the target resource in the specified subscription or resource group. Common causes include:
- The resource was accidentally or intentionally deleted.
- You are querying the wrong subscription or resource group.
- Soft-delete (if supported) has retained a tombstoned copy rather than the live resource.
Verify Resource Existence
- Action: In the Azure portal or Azure CLI, confirm the resource’s subscription and resource group • Portal: Navigate to All resources → filter by name, resource group, subscription • CLI:
az login az account set --subscription "<YourSubscriptionNameOrID>" az resource show \ --name "<ResourceName>" \ --resource-group "<ResourceGroupName>" - Expected outcome: You either see the live resource or receive a “not found” message indicating it has been deleted or you are targeting the wrong scope.
Restore or Redeploy the Resource
- If soft-delete is supported and enabled for this resource type (for example, Azure Key Vault, Storage Account, App Service): • Portal:
- Go to the Recovery Services or Deleted resources blade.
- Locate your resource and click Restore or Recover.
az keyvault recover --name "<VaultName>" - If soft-delete is not available or recovery window has expired: • Redeploy via ARM template:
- Open your infrastructure-as-code repository.
- Execute:
az deployment group create \ --resource-group "<ResourceGroupName>" \ --template-file "./azuredeploy.json" \ --parameters @azuredeploy.parameters.json
- Expected outcome: The resource is present again in the correct subscription and resource group with the desired configuration.
Verification
- In the portal or via CLI, run the same verification commands from Step 1 to ensure the resource is listed and healthy.
- Optionally, perform a simple connectivity or functionality test (e.g., hit the endpoint, list container, retrieve a secret).
Prevention
- Enable soft-delete and retention policies for resource types that support it (Key Vault, Storage Accounts, App Services, etc.).
- Apply ReadOnly or CanNotDelete resource locks on critical resources:
az lock create \ --name "PreventDeletion" \ --lock-type CanNotDelete \ --resource-group "<ResourceGroupName>" \ --resource-name "<ResourceName>" \ --resource-type "<ResourceProvider/ResourceType>" - Implement role-based access control (RBAC) with least-privilege assignments to reduce accidental deletions.
- Automate deployments with CI/CD and ARM templates to allow rapid redeployment and version control.
Additional Resources
- ARM template redeploy overview: Deploy template - Azure portal - Azure Resource Manager | Microsoft Learn
- Azure resource locks: Lock your Azure resources to protect your infrastructure - Azure Resource Manager | Microsoft Learn
Hope this helps! If you have any more details to share about your situation, I can provide more specific guidance.