Multiple resource group found

Pavel Makul 0 Reputation points
2024-07-17T18:57:44.0633333+00:00

We faced a strange issue during deploying our API to Azure AppService resource. Deploy yaml pipeline includes AzureAppServiceManageV0 task run and it is precisely this task that has begun to fail recently. We continue getting "Multiple resource group found for App Service 'our-api-name'" error message. But on Azure Portal for current subscription we have exactly single 'our-api-name' resource. Could you please explain what went wrong? Just for info we decided to check how many resources we have with name 'our-api-name' using Azure CLI in cmd with command 'az resource list --name our-api-name --resource-type Microsoft.Web/sites'. And Azure CLI shows that we have two resources in the same group, but it should be impossible, on Azure Portal for current subscription we see exactly single resource.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,879 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 18,451 Reputation points
    2024-07-19T19:56:10.8533333+00:00

    Hello @Pavel Makul there a few possible causes for this scenario:

    1. 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.
    2. 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:

    1. Check Azure Resource Explorer:
    2. 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.
    3. 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:
         az resource delete --id {resource-id} --force-deletion
      
      Replace {resource-id} with the ID of the soft-deleted resource.
    4. 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

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.