More Info:
Ensure that external IP addresses are not assigned to Vertex AI notebook instancesRisk Level
MediumAddress
SecurityCompliance Standards
- CIS GCP
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Below are console-based steps to ensure Vertex AI Workbench (Notebooks) do not have external IP addresses. Since you cannot remove an external IP from an existing notebook instance, the remediation is to create a new instance without external IP and migrate your work.
Summary: use the Vertex AI Workbench console to (1) identify notebooks with external IPs, (2) create new ones with External IP = None in the Networking settings, (3) migrate content, and (4) delete the old instances.
1. Identify notebooks with external IPs
- Go to Vertex AI in the GCP console.
- In the left menu, click Workbench → User-managed notebooks (and Managed notebooks if you use those).
- In the list, look at the Network / External IP column:
- If it shows an IP (e.g.,
34.x.x.x), that instance has an external IP. - If it says None, it has no external IP.
- If it shows an IP (e.g.,
2. Create a new notebook instance with no external IP
You’ll create a replacement instance with only an internal IP.- Still in Vertex AI → Workbench → User-managed notebooks (or Managed notebooks, as appropriate), click New notebook (or Create).
- Choose your environment (e.g., TensorFlow, PyTorch, base image, etc.).
- In the Create notebook page, expand the Networking or Advanced options section:
- Network: choose your desired VPC network.
- Subnet: select the appropriate subnet.
- External IP:
- Set to None (or uncheck any option that says “Assign external IP” or “Allow access to external networks”).
- If required for private access:
- Ensure your environment can reach required services via:
- Private Google Access enabled on the subnet, or
- Cloud NAT or Private Service Connect, depending on your design.
- Ensure your environment can reach required services via:
- Complete the remaining configuration (machine type, disk, etc.).
- Click Create.
The new notebook will be created without an external IP.
3. Migrate your work from the old instance
- On the old notebook instance:
- Open JupyterLab / Jupyter from the console.
- Export notebooks, scripts, and data:
- Download locally, or
- Save to Cloud Storage (recommended).
- On the new instance:
- Open JupyterLab / Jupyter.
- Upload your notebooks and files, or pull them from Cloud Storage.
- Verify everything runs correctly without an external IP (you may need to adjust how you access external data/services).
4. Delete the old instance with external IP
- Go back to Vertex AI → Workbench.
- For each old instance with an external IP:
- Stop it if it’s running (optional but a good check).
- Click the three-dot menu (…) on the right and choose Delete.
- Confirm deletion.
This removes the external IP and prevents future exposure.
5. Enforce “no external IP” for future notebooks (operational control)
While not a strict console-only control, you can:- Standardize on a custom image and a documented creation procedure that always sets External IP = None.
- Optionally:
- Use Organization Policies to restrict external IPs for Compute Engine (which backs user-managed notebooks), such as:
constraints/compute.vmExternalIpAccess
This forces new VMs (including notebook backends) to be created without external IPs.
- Use Organization Policies to restrict external IPs for Compute Engine (which backs user-managed notebooks), such as:
Summary: use the Vertex AI Workbench console to (1) identify notebooks with external IPs, (2) create new ones with External IP = None in the Networking settings, (3) migrate content, and (4) delete the old instances.
Using CLI
Using CLI
Below is how to remediate this using gcloud CLI for both:
(Change Look for:
Alternatively, stop the VM directly:
You’ll usually see:If the access config name is different, use the actual name from the describe output.or:Now the instance will have only an internal IP.
This should output
For managed notebooks (Vertex AI Workbench Managed):(Use the appropriate
If you share your exact notebook type (Managed vs User-managed) and region, I can give a fully concrete create command for that case.
- Existing Vertex AI Notebook instances
- New Vertex AI Notebook instances (to prevent future issues)
Note: Vertex AI Workbench notebooks run on underlying Compute Engine VMs. Removing the external IP is done at the VM level.
1. Identify the Notebook and Underlying VM
- List your Vertex AI Notebook instances:
--location as needed.)- Describe the specific instance to confirm zone and details:
gceSetup.machineType→ gives zone (e.g.us-central1-b)gceSetup.vmNameor similar → underlying VM name (if not obvious, it is usually very similar to the notebook instance ID).
2. Stop the Notebook / VM
To be safe, stop the notebook instance first:3. Remove the External IP (Access Config) from the VM
- Check the network interfaces and access config name:
name: external-nattype: ONE_TO_ONE_NAT
- Remove the external IP (delete access config) from the primary NIC:
- Start the VM / notebook instance again:
4. Verify No External IP Exists
[] or no ONE_TO_ONE_NAT entry.5. Prevent External IPs for New Notebook Instances
When creating Vertex AI Workbench Notebooks via CLI, always specify no public IP (flag name can vary depending on type):For classic/user-managed notebooks:gcloud notebooks instances create / gcloud notebooks runtimes create flags available in your version: any option that disables the public/external IP such as --no-public-ip or equivalent.)If you share your exact notebook type (Managed vs User-managed) and region, I can give a fully concrete create command for that case.
Using Python
Using Python
Below is a practical way to remediate this using Python:Goal:
Make sure your ADC (Application Default Credentials) has permissions:
2. List notebook instances and check
Key field:
- Detect Vertex AI Workbench (Notebooks API) instances that have external IPs.
- Ensure future instances are created without external IPs (no_public_ip = True).
- For existing non‑compliant instances, you generally must recreate them without a public IP.
1. Setup
roles/notebooks.adminroles/compute.viewer(if you want to double-check NICs)
2. List notebook instances and check no_public_ip
- If
no_public_ipisTrue, the instance is configured without an external IP. - If
no_public_ipisFalseor missing, treat it as non‑compliant.
3. Create new notebook instances without external IP
This is the primary technical remediation: make sure all new instances setno_public_ip = True.no_public_ip=True→ instructs Vertex AI Workbench to not assign an external IP.
4. Handling existing non‑compliant instances
Theno_public_ip setting is effectively a creation-time property. There is no simple “flip a flag” API call to strip the external IP from an existing Workbench instance in a supported way.Typical remediation pattern:- Export / backup content from the old instance (e.g., clone repos, copy notebooks to Cloud Storage or Git).
- Stop and delete the old instance:
- Recreate a new instance with identical config (machine type, image, environment), but with
no_public_ip=Trueas shown in section 3. - Restore your notebook content.
- Lists instances
- Filters those with
no_public_ip != True - Logs them (for manual migration) or, if your policy allows, deletes and recreates them with the secure configuration.
5. (Optional) Policy enforcement / guardrail
To ensure all future notebooks are compliant, combine this with:- An organization policy to restrict external IPs on Compute Engine VMs (
constraints/compute.vmExternalIpAccess). - A CI/CD or infra-as-code pipeline where notebooks are created only via code like the above, never via console clicks.
Using Terraform
Using Terraform
VERTEX_AI_NOTEBOOK_INSTANCE_NAMEwith your Vertex AI Workbench instance name.PROJECT_IDwith your GCP project ID.REGIONwith the region of the instance.VPC_NETWORK_NAMEandSUBNET_NAMEwith your VPC and subnet.SERVICE_ACCOUNT_EMAILwith the service account the instance should use.
disable_public_ip from false to true may require recreation depending on the current instance configuration; check the terraform plan output for any -/+ replacement indicator on google_workbench_instance.VERTEX_AI_NOTEBOOK_INSTANCE.For verification, terraform plan should show:- An update (or replacement) to
google_workbench_instance.VERTEX_AI_NOTEBOOK_INSTANCEsettingdisable_public_ip = true(andinternal_ip_only = trueif you added it), with no remaining attributes indicating an external/public IP.

