Resources and resource group stuck on delete

Mauricio Bittar 20 Reputation points
2024-05-09T14:36:05.38+00:00

I attempted to delete, via Azure Portal, a resource group and its associated resources (approximately 25), which were created using Terraform, due to a corrupted state file. The deletion process was successful except for a Linux function app and its app service plan; all other resources were removed as intended. Subsequently, I tried every method available to delete the remaining components, including the Azure Portal, CLI, and targeting both the resource group and individual resources, but to no avail.Captura de tela 2024-05-09 112753

Captura de tela 2024-05-07 104205

PS.: Those errors shows up after a long time after command runs.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,421 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 69,756 Reputation points
    2024-05-13T05:35:37.24+00:00

    @Mauricio Bittar I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to "Accept" the answer.

    Issue:

    You observed that the resource group deletion stuck with the below error message. Deletion of resource

    group 'rg-ocr-cvp-atos' did not finish within the allowed time as resources with identifiers 'Microsoft.Web/sites/func12-ocr-cvp-,Microsoft.Web/serverFarms/asp-ocr-cvp- could not be

    deleted. The provisioning state of the resource group will be rolled back. The tracking Id is '72942c69-33f4

    Please check audit logs for more details. (Code:

    ResourceGroupDeletionTimeout) This network currently has another operation in progress. Please try again later. (Code: Conflict, Target: /subscriptions

    Solution:

    You have added the --verbose and --no-wait flags to the CLI delete command. This action triggered a different error message that disclosed the actual problem: a VNet integration on the function app. Although the VNet/subnet had been deleted prior to the function app, the attachment remained. To remedy this, I recreated the VNet and subnet using the same names, which allowed me to remove the attachment and successfully delete the function app along with its resource group.

    Thank you again for your time and patience throughout this issue.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Lem 2 Reputation points Microsoft Employee
    2024-05-09T22:48:44.2966667+00:00

    Hi @Mauricio Bittar the underlying exception could be different with the 429 error, can you try to remove the function app first, and then remove the app service plan?


  2. Mauricio Bittar 20 Reputation points
    2024-05-10T14:10:46.0766667+00:00

    I resolved the issue by adding the --verbose and --no-wait flags to the CLI delete command. This action triggered a different error message that disclosed the actual problem: a VNet integration on the function app. Although the VNet/subnet had been deleted prior to the function app, the attachment remained. To remedy this, I recreated the VNet and subnet using the same names, which allowed me to remove the attachment and successfully delete the function app along with its resource group.

    0 comments No comments