Skip to content

Commit

Permalink
Update orphan-resources-queries.md
Browse files Browse the repository at this point in the history
- Availability Set in ASR 
  - Fixed query to exclude availability sets related to Azure site recovery.
  - [Issue](#38)
  • Loading branch information
dolevshor authored May 16, 2024
1 parent 3b6d390 commit df5de3c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Queries/orphan-resources-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,21 @@ resources

#### Availability Set

[Availability Sets](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview) that not associated to any Virtual Machine (VM) or Virtual Machine Scale Set (VMSS).
[Availability Sets](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview) that not associated to any Virtual Machine (VM) or Virtual Machine Scale Set (VMSS) and not related to Azure Site Recovery.

```kql
Resources
| where type =~ 'Microsoft.Compute/availabilitySets'
| where properties.virtualMachines == "[]"
| where not(name endswith "-asr")
| extend Details = pack_all()
| project subscriptionId, Resource=id, resourceGroup, location, tags, Details
```

> **_Note:_** Azure Site Recovery (aka: ASR) Availability Set are excluded from the orphaned resource query.
> <sub> 1) Enable replication process for VM with Availability Set created additional Availability Set that end with the suffix *"-asr"*.<br/>
## Storage

#### Managed Disks
Expand Down

0 comments on commit df5de3c

Please sign in to comment.