Delete Detached Disks

Overview

The Delete Detached Disks action is used to delete disks that have become detached, which commonly occurs when a virtual machine they were connected to has been removed.

Cloud storage providers allocate resources to disks based on their usage. Deleting detached disks frees up resources that can be used by your other disks to create a clutter-free environment, leading to better performance, reduction of cloud costs and limits the possibility of security risks such as unauthorized access.

Permissions

When you link GorillaStack to your Azure account, GorillaStack creates a service principal that provides access to the following permissions that are used by this action:

  • Microsoft.Compute/disks/delete
  • Microsoft.Compute/disks/read

Getting Started

  1. Link your Azure account to your GorillaStack account if you have not done so already
  2. Create a new rule in GorillaStack
  3. In the rule’s context settings, select Azure as the platform, and then select one or more linked Azure Subscriptions to target
  4. In the rule’s trigger settings, select any available trigger — Schedule and Manual Execution are the most popular, but in this case you might want to select Detached Disks Detected
  5. In the rule’s actions settings, select Delete Detached Disks as the action
  6. In the Delete Detached Disks action, specify how many days the disks must be detached for to be deleted
  7. You might want to insert a Manual Approval pause before the action in case a disk is intentionally detached, perhaps because you are moving it from one virtual machine to another