turbot/steampipe-mod-terraform-azure-compliance

Control: Azure Defender for Azure SQL Database servers should be enabled

Description

Azure Defender for SQL provides functionality for surfacing and mitigating potential database vulnerabilities, detecting anomalous activities that could indicate threats to SQL databases, and discovering and classifying sensitive data.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.sql_database_server_azure_defender_enabled

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

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

Tags