Can´t delete a resource

Roberto Araujo Filho 115 Reputation points
2024-11-15T11:49:25.8666667+00:00

Tried to delete a 'hub' resource got the following error:

<resource_name>: AI hub still has associated AI projects: /subscriptions/<substcription>/resourceGroups/<resource_group_name>/providers/Microsoft.MachineLearningServices/workspaces/<workspace_name> in Active state. Please hard delete it first (Code: ValidationError)

But I can´t find the workspace (<workspace_name>) in Azure Portal. So, tried a hard delete using CLI:

 az ml workspace delete --resource-group <resource_group_name> --workspace-name <workspace_name> --no-wait

and got the following error:

ProjectSystemException:
        Message: Workspace not found.
        InnerException None
        ErrorResponse
{
    "error": {
        "message": "Workspace not found."
    }
}

So, I can´t delete the resource group too. I will appreciate if anyone can help.

Tried:

az resource delete --name xpto-hub-dev --resource-group xpto-dev --verbose --resource-type Microsoft.MachineLearningServices/workspaces

And got: "AI hub still has associated AI projects: /subscriptions/.../resourceGroups/xpto-dev/providers/Microsoft.MachineLearningServices/workspaces/xpto-hub-dev-proj in Active state. Please hard delete it first"

But, actually, there is no such project 'xpto-hub-dev-proj'. It has been deleted and I can´t find it anywhere (using Portal or CLI).

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,976 questions
{count} votes

2 answers

Sort by: Most helpful
  1. akinbade abiola 18,715 Reputation points
    2024-11-17T03:00:44.4966667+00:00

    This can happen if the workspace was deleted improperly. Try and delete using the azure cli

    See: https://zcusa.951200.xyz/en-us/cli/azure/ml/workspace?view=azure-cli-latest

    Try:

    az ml workspace delete --resource-group <resource_group_name> --name <workspace_name> --yes --no-wait
    
    

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola


  2. Roberto Araujo Filho 115 Reputation points
    2024-11-18T15:57:09.2166667+00:00

    The problem was that I couldn´t delete the resource because Azure informed that It still had an associated AI project, but I couldn´t find this 'project' anywhere.

    So I decided to just create a new project under the resource with the same name Azure informed and after that I could delete the resource with the associated project via Portal.

    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.