turbot/steampipe-mod-terraform-azure-compliance

Control: Azure File Sync should use private link

Description

Creating a private endpoint for the indicated Storage Sync Service resource allows you to address your Storage Sync Service resource from within the private IP address space of your organization's network, rather than through the internet-accessible public endpoint. Creating a private endpoint by itself does not disable the public endpoint.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.storage_sync_private_link_used

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std -> 'incoming_traffic_policy') is null then 'alarm'
when (attributes_std ->> 'incoming_traffic_policy') = 'AllowAllTraffic' then 'alarm'
else 'ok'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'incoming_traffic_policy') is null then ' does not use private link'
when (attributes_std ->> 'incoming_traffic_policy') = 'AllowAllTraffic' then ' uses public networks'
else ' uses private link'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_storage_sync';

Tags