turbot/steampipe-mod-gcp-compliance

Control: Compute Networks should have auto create subnetwork enabled

Description

This control ensures that auto create subnetwork is enabled for Compute Network. Legacy network is not recommended, subnetworks cannot be created in a legacy network.

Usage

Run the control in your terminal:

powerpipe control run gcp_compliance.control.compute_network_auto_create_subnetwork_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run gcp_compliance.control.compute_network_auto_create_subnetwork_enabled --share

SQL

This control uses a named query:

select
self_link resource,
case
when auto_create_subnetworks then 'ok'
else 'alarm'
end as status,
case
when auto_create_subnetworks then title || ' auto create subnetwork enabled.'
else title || ' auto create subnetwork disabled.'
end as reason
, project as project
from
gcp_compute_network;

Tags