Urgent need to delete the resource group that is generating costs

Thiago Candido Martins 0 Reputation points
2025-12-09T19:19:57.1633333+00:00

I want to delete a resource group that has 3 resources: network security group, public IP address, and load balancer.

Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-09T19:20:09.53+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To delete a resource group in Azure that contains resources such as a network security group, public IP address, and load balancer, you can use one of the following methods:

    Azure CLI

    You can delete the resource group using the Azure CLI with the following command:

    az group delete --name YourResourceGroupName --yes
    

    PowerShell

    If you prefer using PowerShell, you can execute the following command:

    Remove-AzResourceGroup -Name YourResourceGroupName -Force
    

    Azure Portal

    Alternatively, you can delete the resource group through the Azure Portal:

    1. Sign in to the Azure portal.
    2. Navigate to Resource groups.
    3. Select the resource group you want to delete.
    4. Click on Delete resource group.
    5. Confirm the deletion by typing the name of the resource group and selecting Delete.

    Make sure to replace YourResourceGroupName with the actual name of your resource group. This will remove the resource group along with all the resources it contains, helping you stop any ongoing costs associated with them.


    References:


  2. Ravi Varma Mudduluru 3,625 Reputation points Microsoft External Staff Moderator
    2025-12-09T20:39:59.4366667+00:00

    Hello @ Thiago Candido Martins,

    Thanks for reaching out to Microsoft Q&A.

    It looks like you’re trying to delete a resource group that contains a network security group, a public IP address, and a load balancer, but you're running into issues due to potential locks or dependencies. Here’s how you can tackle this:

    Steps to delete the Resource Group:

    Check for Resource Locks:

    • Go to the Azure portal.
      • Navigate to Resource Groups and select the resource group you want to delete.
        • On the left menu under Settings, click Locks.
          • If there are any locks present, you'll need to remove them before you can delete the resource group.
          Verify Dependencies:
          • Make sure there aren’t any dependent resources that might be preventing the deletion. For example, if a resource within this group is linked to another resource outside the group, you’ll need to delete that dependency first.**
          Ensure Permissions**:
          • Confirm that you have the necessary permissions to delete the resource group. You may need to have roles like Owner or User Access Administrator. If you don’t have the right permissions, reach out to your Azure Subscription Administrator. Delete the Resource Group:
            • Once you've checked for locks and dependencies, go back to the Resource Group page and select Delete Resource Group.
        • Confirm the deletion.

    Additional Commands:

    If you prefer using commands, here are a couple of ways you can delete the resource group via PowerShell or Azure CLI:

    Azure CLI:

    az group delete --name <your-resource-group-name> --yes --no-wait
    

    PowerShell:

    Remove-AzResourceGroup -Name <your-resource-group-name>
    

    Important Note:

    Deleting a resource group is irreversible, so make sure you double-check that you don’t need any of the resources in there before proceeding.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Your answer

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