Control: Cloud Build workers should use private IP addresses
Description
This control checks whether Cloud Build workers are configured to use private IP addresses.
Usage
Run the control in your terminal:
powerpipe control run terraform_gcp_compliance.control.cloudbuild_workers_use_private_ip
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_gcp_compliance.control.cloudbuild_workers_use_private_ip --share
SQL
This control uses a named query:
select address as resource, case when (attributes_std -> 'worker_config' ->> 'no_external_ip') = 'true' then 'ok' else 'alarm' end as status, split_part(address, '.', 2) || case when (attributes_std -> 'worker_config' ->> 'no_external_ip') = 'true' then ' no external IP configured' else ' external IP configured' end || '.' reason , path || ':' || start_linefrom terraform_resourcewhere type = 'google_cloudbuild_worker_pool';