turbot/terraform_azure_compliance

Query: network_security_rule_udp_access_restricted

Usage

powerpipe query terraform_azure_compliance.query.network_security_rule_udp_access_restricted

Steampipe Tables

SQL

select
address as resource,
case
when lower(attributes_std ->> 'protocol') = 'udp'
and lower(attributes_std ->> 'direction') = 'inbound'
and lower(attributes_std ->> 'access') = 'allow'
and lower(attributes_std ->> 'source_address_prefix') in ('*', '0.0.0.0', '<nw>/0', '/0', 'internet', 'any') then 'alarm'
else 'ok'
end as status,
split_part(address, '.', 2) || case
when lower(attributes_std ->> 'protocol') = 'udp'
and lower(attributes_std ->> 'direction') = 'inbound'
and lower(attributes_std ->> 'access') = 'allow'
and lower(attributes_std ->> 'source_address_prefix') in ('*', '0.0.0.0', '<nw>/0', '/0', 'internet', 'any') then ' allows UDP services from internet'
else ' restricts UDP services from internet'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_network_security_rule';

Controls

The query is being used by the following controls: