Control: Dataproc cluster should not have public IP
Description
This control checks whether Dataproc cluster has public IP.
Usage
Run the control in your terminal:
powerpipe control run terraform_gcp_compliance.control.dataproc_cluster_public_ip_disabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_gcp_compliance.control.dataproc_cluster_public_ip_disabled --share
SQL
This control uses a named query:
select address as resource, case when (attributes_std -> 'cluster_config' -> 'gce_cluster_config' ->> 'internal_ip_only') = 'true' then 'ok' else 'alarm' end as status, split_part(address, '.', 2) || case when (attributes_std -> 'cluster_config' -> 'gce_cluster_config' ->> 'internal_ip_only') = 'true' then ' is not accessible from the public internet' else ' is accessible from the public internet' end || '.' reason , path || ':' || start_linefrom terraform_resourcewhere type = 'google_dataproc_cluster';