turbot/steampipe-mod-gcp-compliance

Control: Verify all GKE clusters are Private Clusters

Usage

Run the control in your terminal:

powerpipe control run gcp_compliance.control.allow_only_private_cluster

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
self_link resource,
case
when (private_cluster_config -> 'enablePrivateEndpoint') :: bool then 'ok'
else 'alarm'
end as status,
case
when (private_cluster_config -> 'enablePrivateEndpoint') :: bool then title || ' is not publicly accessible.'
else title || ' is publicly accessible.'
end as reason,
location as location,
project as project
from
gcp_kubernetes_cluster;

Tags