turbot/terraform_azure_compliance

Query: synapse_workspace_private_link_used

Usage

powerpipe query terraform_azure_compliance.query.synapse_workspace_private_link_used

Steampipe Tables

SQL

with synapse_workspaces as (
select
'${azurerm_synapse_workspace.' || name || '.id}' as sw_id,
*
from
terraform_resource
where
type = 'azurerm_synapse_workspace'
), synapse_workspace_private_link as (
select
*
from
terraform_resource
where
type = 'azurerm_synapse_managed_private_endpoint'
)
select
a.address as resource,
case
when (s.attributes_std ->> 'synapse_workspace_id') is not null then 'ok'
else 'alarm'
end as status,
split_part(a.address, '.', 2) || case
when (s.attributes_std ->> 'synapse_workspace_id') is not null then ' uses private link'
else ' not uses private link'
end || '.' reason
, a.path || ':' || a.start_line
from
synapse_workspaces as a
left join synapse_workspace_private_link as s on a.sw_id = (s.attributes_std ->> 'synapse_workspace_id');

Controls

The query is being used by the following controls: