turbot/steampipe-mod-gcp-compliance

Control: Check that GKE clusters have a Network Policy installed

Usage

Run the control in your terminal:

powerpipe control run gcp_compliance.control.gke_restrict_pod_traffic

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
self_link resource,
case
when network_policy ->> 'enabled' = 'true' then 'ok'
else 'alarm'
end as status,
case
when network_policy ->> 'enabled' = 'true' then title || ' Network policy is enabled.'
else title || ' Network policy is not enabled.'
end as reason
, location as location, project as project
from
gcp_kubernetes_cluster;

Tags