Detection: Resource Group Deleted
Overview
Detect when an Azure resource group was deleted. Resource groups serve as logical containers for managing Azure resources, and their deletion can lead to the loss of all associated resources, potentially causing service disruptions and data loss. Monitoring these deletions helps ensure proper oversight and prevents accidental or unauthorized removal of critical resources.
References:
Usage
Run the detection in your terminal:
powerpipe detection run azure_activity_log_detections.detection.resource_group_deletedSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe detection run azure_activity_log_detections.detection.resource_group_deleted --shareSQL
This detection uses a named query:
select  tp_timestamp as timestamp,operation_name as operation,resource_id as resource,caller as actor,tp_index::varchar as subscription_id,resource_group_name as resource_group,tp_id as source_id,status as event_status,*
from  azure_activity_logwhere  operation_name = 'Microsoft.Resources/subscriptions/resourcegroups/delete'  and status = 'Succeeded'
order by  timestamp desc;