turbot/terraform_gcp_compliance

Query: compute_network_contains_no_default_network

Usage

powerpipe query terraform_gcp_compliance.query.compute_network_contains_no_default_network

Steampipe Tables

SQL

select
address as resource,
case
when name not ilike 'default' then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when name not ilike 'default'
and (attributes_std ->> 'project') is not null then ' ' || (attributes_std ->> 'project') || ' is not using default network'
when name not ilike 'default'
and (attributes_std ->> 'project') is null then ' provider project is not using default network'
when name ilike 'default'
and (attributes_std ->> 'project') is null then ' provider project is using default network'
when name ilike 'default'
and (attributes_std ->> 'project') is not null then ' ' || (attributes_std ->> 'project') || ' is using default network'
end || '.' reason,
path || ':' || start_line
from
terraform_resource
where
type = 'google_compute_network';

Controls

The query is being used by the following controls: