turbot/terraform_gcp_compliance

Query: compute_network_contains_no_legacy_network

Usage

powerpipe query terraform_gcp_compliance.query.compute_network_contains_no_legacy_network

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'auto_create_subnetworks') is null then 'ok'
when (attributes_std -> 'auto_create_subnetworks') :: bool then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'auto_create_subnetworks') is null then ' is not a legacy network'
when (attributes_std -> 'auto_create_subnetworks') :: bool then ' is not a legacy network'
else ' is a legacy network'
end || '.' reason,
path || ':' || start_line
from
terraform_resource
where
type = 'google_compute_network';

Controls

The query is being used by the following controls: