Control: Audit virtual machines without disaster recovery configured
Description
Audit virtual machines which do not have disaster recovery configured.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.compute_vm_disaster_recovery_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.compute_vm_disaster_recovery_enabled --share
SQL
This control uses a named query:
with vm_dr_enabled as ( select substr(source_id, 0, length(source_id)) as source_id from azure_resource_link as l left join azure_compute_virtual_machine as vm on lower(substr(source_id, 0, length(source_id)))= lower(vm.id) where l.name like 'ASR-Protect-%')select vm.vm_id as resource, case when l.source_id is null then 'alarm' else 'ok' end as status, case when l.source_id is null then vm.title || ' disaster recovery disabled.' else vm.title || ' disaster recovery enabled.' end as reason , vm.resource_group as resource_group , sub.display_name as subscriptionfrom azure_compute_virtual_machine as vm left join vm_dr_enabled as l on lower(vm.id) = lower(l.source_id), azure_subscription subwhere sub.subscription_id = vm.subscription_id;