turbot/steampipe-mod-azure-compliance

Query: compute_vm_trust_launch_enabled

Usage

powerpipe query azure_compliance.query.compute_vm_trust_launch_enabled

SQL

select
vm.id as resource,
case
when (security_profile ->> 'securityType') is null or (security_profile ->> 'securityType') <> 'TrustedLaunch' then 'skip'
when (security_profile -> 'uefiSettings' -> 'secureBootEnabled')::bool
and (security_profile -> 'uefiSettings' -> 'vTpmEnabled')::bool then 'ok'
else 'alarm'
end as status,
case
when (security_profile ->> 'securityType') is null or (security_profile ->> 'securityType') <> 'TrustedLaunch' then vm.name || ' not using trust launch security type.'
when (security_profile -> 'uefiSettings' -> 'secureBootEnabled')::bool
and (security_profile -> 'uefiSettings' -> 'vTpmEnabled')::bool then vm.name || ' trusted launch enabled.'
else vm.name || ' trusted launch disabled.'
end as reason
, vm.resource_group as resource_group
, sub.display_name as subscription
from
azure_compute_virtual_machine vm,
azure_subscription sub
where
sub.subscription_id = vm.subscription_id;

Controls

The query is being used by the following controls: