turbot/steampipe-mod-terraform-azure-compliance

Control: Ensure that Azure Defender is set to On for Azure SQL database servers

Description

Turning on Azure Defender enables threat detection for Azure SQL database servers, providing threat intelligence, anomaly detection, and behavior analytics in the Azure Security Center.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.securitycenter_azure_defender_on_for_sqldb

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

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

Tags