Control: Storage accounts should restrict network access
Description
Network access to storage accounts should be restricted. Configure network rules so only applications from allowed networks can access the storage account. To allow connections from specific internet or on-premises clients, access can be granted to traffic from specific Azure virtual networks or to public internet IP address ranges.
Usage
Run the control in your terminal:
powerpipe control run terraform_azure_compliance.control.storage_account_default_network_access_rule_deniedSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_azure_compliance.control.storage_account_default_network_access_rule_denied --shareSQL
This control uses a named query:
select  address as resource,  case    when (attributes_std -> 'network_rules') is null then 'alarm'    when (attributes_std -> 'network_rules' ->> 'default_action') = 'Allow' then 'alarm'    else 'ok'  end status,  split_part(address, '.', 2) || case    when (attributes_std -> 'network_rules') is null then ' has no network rules defined'    when (attributes_std -> 'network_rules' ->> 'default_action') = 'Allow' then ' allows traffic from specific networks'    else ' allows network access'  end || '.' reason    , path || ':' || start_linefrom  terraform_resourcewhere  type = 'azurerm_storage_account';