turbot/azure_compliance

Query: kubernetes_cluster_temp_disks_and_agent_node_pool_cache_encrypted_at_host

Usage

powerpipe query azure_compliance.query.kubernetes_cluster_temp_disks_and_agent_node_pool_cache_encrypted_at_host

SQL

with kubernetes_cluster as(
select
id,
name,
subscription_id,
resource_group
from
azure_kubernetes_cluster,
jsonb_array_elements(agent_pool_profiles) as p
where
p -> 'enableEncryptionAtHost' = 'true'
)
select
a.id as resource,
case
when s.id is not null then 'ok'
else 'alarm'
end as status,
case
when s.id is not null then a.name || ' encrypted at host.'
else a.name || ' not encrypted at host.'
end as reason,
a.resource_group as resource_group,
sub.display_name as subscription
from
azure_kubernetes_cluster as a
left join kubernetes_cluster as s on s.id = a.id,
azure_subscription as sub
where
sub.subscription_id = a.subscription_id;

Controls

The query is being used by the following controls: