Delete Detached Disks

The Delete Detached Disks action is used to delete disks that have become detached, for example because the virtual machine they were previously attached to has been deleted.

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 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