Azure Orphan Resources

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.

Orphan resources are quite a common theme in Azure environments.

The main purposes of deleting the orphaned resources are to save the cost of unused resources, prevent misconfiguration and simplify operations.


TLDR: GitHub for the Workbook


What is an Orphan Resource?

Orphan resource is an unused resource that can exists in Azure environment.

In some cases (examples below) you pay for the resources even though they are orphans and in other cases the resources have no cost but they can be the cause of misconfiguration and complexity operational.


Customer story

As part of my role I worked with a wide variety of customers and all of them have orphan resources.


One of the customers I worked with, based on this workbook:

  • Discover +1k orphan resources. (RGs, NICs, Disks, etc.)
  • Save ~$7k/m by deleting unused orphan disks
  • Save ~$100/m by deleting unused orphan Public IPs
  • Delete ~300 empty resource groups
  • Delete ~250 unused network interfaces
  • Delete ~ 30 unused network security groups
  • Delete ~ 10 unused Route tables



Cost perspective

  • Orphan Disks
    • An orphan Disk continues to charge a cost as long as you have not deleted it
      • It’s recommended to double check before you delete an orphan disk because it is not recoverable
      • Creating a snapshot can be an option to backup orphan disk before deleting
  • Orphan App Service Plans
    • App Service Plan charges a cost although he does not host any Apps


Operational & misconfiguration perspective

  • Network Interfaces
    • Orphan Network Interface has no cost, but it takes up space within the virtual network range
  • Route Tables
    • It’s important to delete orphan Route Tables to prevent misconfiguration by associating a wrong Route Table to a subnet
  • Network Security Groups (NSGs)
    • It’s important to delete orphan Network Security Groups (aka: NSG) to prevent misconfiguration by associating the wrong NSG to a subnet or network interface with unrelevant inbound/outbound rules


The Workbook

This workbook will centralize and help present orphan resources and allow you to:

  • Save money
  • Prevent mistakes and misconfiguration
  • Simplify operational

All the information presented in this Workbook is based on Azure Resource Graph queries.


Type of resources covered:

  • Disks
  • Network Interfaces
  • Public IPs
  • Resource Groups
  • Network Security Groups (NSGs)
  • Availability Set
  • Route Tables
  • Load Balancers
  • App Service Plans


Your Support

I would love your feedback:

  1. How many orphan resources have you found?
  2. What Type of resources?
  3. How much potential money has been saved?
  4. Additional resource types that you think may be covered by this workbook?




Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.