Hello @Pavel Makul there a few possible causes for this scenario:
- It's possible that you previously had another resource named "our-api-name" that was deleted but not fully purged from ARM. These "soft-deleted" resources can sometimes cause conflicts during deployment.
- There might be an inconsistency within the resource group where your "our-api-name" App Service resides. This could be due to manual configuration errors or unexpected resource creation.
Here are a few ways to troubleshoot the issue:
- Check Azure Resource Explorer:
- Access the Azure Resource Explorer (https://azure.microsoft.com/en-us/blog/azure-resource-explorer-a-new-tool-to-discover-the-azure-api/).
- Search for "your-api-name" and filter by resource type "Microsoft.Web/sites". This can reveal hidden or soft-deleted resources causing the conflict.
- Verify Resource Group:
- In the Azure portal, navigate to the resource group containing your "your-api-name" App Service.
- Double-check there are no duplicate App Services with the same name within this group.
- Clean Up Soft-Deleted Resources:
- If the Azure Resource Explorer reveals a soft-deleted resource, you can attempt to permanently delete it using the Azure CLI command:
Replaceaz resource delete --id {resource-id} --force-deletion
{resource-id}
with the ID of the soft-deleted resource. - Check for any locks or slots: Make sure there are no locks added to the App Service Plan and Resource group. Also, if your app has been configured with multiple slots, ensure that the slots are deleted before deleting the web app.
Hope that helps.
-Grace