Orphaned managed disks should be deleted
Low
Azure
General
disk-managed-disks
Applies to
Microsoft.Compute/disks
What CGPulse checks
A resource passes this rule when isAttached must equal true. Anything else is reported as a finding with the evaluated property value attached as evidence.
How to fix it
Verify the orphaned resource is unused, then delete or reattach it to reduce costs and risk. In Azure Portal: Resource > Overview > verify usage status. See: https://learn.microsoft.com/en-us/azure/advisor/advisor-cost-recommendations
Careful: Permanently deletes the disk. Verify it is truly unused and not a backup before proceeding
CLI
az disk delete --ids "{id}" --yesTerraform
# Remove orphaned managed disk from Terraform state
# terraform state rm azurerm_managed_disk.orphaned
# Or delete via CLI: az disk delete --ids "{id}" --yes
Compliance frameworks
Is your environment compliant with this rule?
CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.
Related Azure rules
- Action Group should be enabled
- Activity Log Alert should be enabled
- AKS cluster logs should be sent to Log Analytics
- AKS cluster must enable RBAC
- AKS cluster must enable RBAC
- AKS cluster should be a private cluster
- AKS cluster should disable local accounts
- AKS cluster should enable Azure RBAC for Kubernetes