Control: Check that GKE clusters have a Network Policy installed
Description
This control checks that GKE clusters have a Network Policy installed.
Usage
Run the control in your terminal:
powerpipe control run terraform_gcp_compliance.control.kubernetes_cluster_network_policy_installed
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_gcp_compliance.control.kubernetes_cluster_network_policy_installed --share
SQL
This control uses a named query:
select address as resource, case when (attributes_std -> 'network_policy') is not null then 'ok' else 'alarm' end as status, name || case when (attributes_std -> 'network_policy') is not null then ' network policy defined' else ' network policy not defined' end || '.' reason , path || ':' || start_linefrom terraform_resourcewhere type = 'google_container_cluster';