turbot/azure_compliance

Query: compute_vm_and_sacle_set_encryption_at_host_enabled

Usage

powerpipe query azure_compliance.query.compute_vm_and_sacle_set_encryption_at_host_enabled

SQL

(
select
a.id as resource,
case
when security_profile -> 'encryptionAtHost' = 'true' then 'ok'
else 'alarm'
end as status,
case
when security_profile -> 'encryptionAtHost' = 'true' then a.name || ' encryption at host enabled.'
else a.name || ' encryption at host disabled.'
end as reason
, a.resource_group as resource_group
, sub.display_name as subscription
from
azure_compute_virtual_machine as a,
azure_subscription as sub
where
sub.subscription_id = a.subscription_id
)
union
(
select
a.id as resource,
case
when virtual_machine_security_profile -> 'encryptionAtHost' = 'true' then 'ok'
else 'alarm'
end as status,
case
when virtual_machine_security_profile -> 'encryptionAtHost' = 'true' then a.name || ' encryption at host enabled.'
else a.name || ' encryption at host disabled.'
end as reason
, a.resource_group as resource_group
, sub.display_name as subscription
from
azure_compute_virtual_machine_scale_set as a,
azure_subscription as sub
where
sub.subscription_id = a.subscription_id
)

Controls

The query is being used by the following controls: