-| **FlagMustBeSetForRestore/NameUnavailable/CustomDomainInUse** | | - This error occurs when you try to deploy a Cognitive Services resource that was **soft-deleted** earlier<br>- Azure requires you to explicitly set the **`restore` flag** to `true` if you want to recover the soft-deleted resource<br>- If you don't want to restore the resource, you must **purge the deleted resource** first before redeploying<br>**Example causes:**<br>- Trying to redeploy a Cognitive Services account with the same name as a previously deleted one<br>- The deleted resource still exists in a **soft-delete retention state**<br>**How to fix:**<br>1. If you want to restore → add `"restore": true` in your template properties<br>2. If you want a fresh deployment → purge the resource using: `az cognitiveservices account purge --name <resource-name> --resource-group <resource-group> --location <location>`<br>- For more details, refer to [Soft delete and resource restore](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/delete-resource-group?tabs=azure-powershell) |
0 commit comments