turbot/steampipe-mod-terraform-gcp-compliance

Control: Vertex AI notebook instances should restrict public access

Description

This control checks whether Vertex AI notebook instances are public.

Usage

Run the control in your terminal:

powerpipe control run terraform_gcp_compliance.control.vertex_ai_notebook_instance_restrict_public_access

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_gcp_compliance.control.vertex_ai_notebook_instance_restrict_public_access --share

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std ->> 'no_public_ip') = 'true' then 'ok'
else 'alarm'
end as status,
split_part(address, '.', 2) || case
when (attributes_std ->> 'no_public_ip') = 'true' then ' not publicly accessible'
else ' publicly accessible'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'google_notebooks_instance';

Tags