turbot/steampipe-mod-terraform-azure-compliance

Control: Azure Defender for Kubernetes should be enabled

Description

Azure Defender for Kubernetes provides real-time threat protection for containerized environments and generates alerts for suspicious activities.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.kubernetes_azure_defender_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_azure_compliance.control.kubernetes_azure_defender_enabled --share

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std ->> 'resource_type') = 'KubernetesService' and (attributes_std ->> 'tier') = 'Standard' then 'ok'
else 'info'
end status,
split_part(address, '.', 2) || case
when (attributes_std ->> 'resource_type') = 'KubernetesService' and (attributes_std ->> 'tier') = 'Standard' then ' Azure Defender on for KubernetesService'
else ' Azure Defender off for KubernetesService'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_security_center_subscription_pricing';

Tags