turbot/terraform_gcp_compliance

Query: storage_bucket_not_publicly_accessible

Usage

powerpipe query terraform_gcp_compliance.query.storage_bucket_not_publicly_accessible

Steampipe Tables

SQL

select
address as resource,
case
when coalesce(trim((attributes_std ->> 'entity')), '') like any (array ['', '%allAuthenticatedUsers%','%allUsers%'])
then 'alarm'
else 'ok'
end as status,
split_part(address, '.', 2) || case
when coalesce(trim((attributes_std ->> 'entity')), '') = '' then ' ''entity'' is not defined'
when (attributes_std ->> 'entity') like any (array ['%allAuthenticatedUsers%','%allUsers%']) then ' publicly accessible'
else ' not publicly accessible'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'google_storage_bucket_access_control';

Controls

The query is being used by the following controls: