turbot/steampipe-mod-terraform-gcp-compliance

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 login
powerpipe 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_line
from
terraform_resource
where
type = 'google_cloudbuild_worker_pool';

Tags