Control: Check that legacy metadata endpoints are disabled on Kubernetes clusters(disabled by default since GKE 1.12+)
Usage
Run the control in your terminal:
powerpipe control run gcp_compliance.control.disable_gke_legacy_endpoints
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_compliance.control.disable_gke_legacy_endpoints --share
SQL
This control uses a named query:
select self_link resource, case when node_config -> 'Metadata' ->> 'disable-legacy-endpoints' = 'true' then 'ok' else 'alarm' end as status, case when node_config -> 'Metadata' ->> 'disable-legacy-endpoints' = 'true' then title || ' legacy endpoints disabled.' else title || ' legacy endpoints enabled.' end as reason , location as location, project as projectfrom gcp_kubernetes_cluster;