More Info:
Ensure that the default VPC network is not being used for your Vertex AI notebook instancesRisk Level
MediumAddress
SecurityCompliance Standards
- CIS GCP
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Below are concise step‑by‑step instructions using only the GCP Console.
After these steps, all Vertex AI notebook instances you actively use will be attached to non‑default VPC networks.
1. Create (or identify) a non‑default VPC network
- In the Google Cloud console, go to VPC network:
Navigation menu → Networking → VPC network → VPC networks. - Check if you already have a non‑default VPC (any network that is not named
default).- If yes, note its Name, Subnets, and Region, then skip to section 2.
- To create a new VPC:
- Click Create VPC network.
- Enter a Name (e.g.,
vertex-notebooks-vpc). - For Subnet creation mode, select Custom.
- Click Add subnet:
- Name: e.g.,
vertex-notebooks-subnet - Region: choose the same region where you will run Vertex AI notebooks.
- IP address range: e.g.,
10.10.0.0/24(or per your IP plan).
- Name: e.g.,
- Configure any Firewall rules as required for your environment (e.g., SSH, HTTPS, internal).
- Click Create.
2. Create a new Vertex AI notebook using the non‑default VPC
Network cannot be changed on an existing instance, so you must create a new one and move your work.
- In the console, go to Vertex AI Workbench:
Navigation menu → Vertex AI → Workbench. - Click New notebook (or Create → User-managed notebooks / Managed notebooks, depending on type).
- Choose your Region (match the subnet’s region if possible).
- Configure machine type, image, etc.
- Expand Advanced options (or Networking section; exact wording may vary by UI version).
- Under Network:
- Network: select your non‑default VPC (e.g.,
vertex-notebooks-vpc). - Subnet: select the custom subnet (e.g.,
vertex-notebooks-subnet).
- Network: select your non‑default VPC (e.g.,
- Optionally adjust:
- External IP (decide if you want a public IP or only private).
- Firewall tags or rules, if exposed.
- Click Create.
3. Stop using and remove notebooks on the default VPC
- In Vertex AI → Workbench, list all notebook instances.
- For each instance:
- Click the instance name.
- Go to the Details or Networking section and verify the Network:
- If the Network is
default, it is non‑compliant with your requirement.
- If the Network is
- After you have migrated workloads to a notebook on a custom VPC:
- Stop the old instance if it is running.
- Click Delete to remove it.
4. (Optional) Prevent new notebooks from using the default network
If you want to enforce this at the org/project level:- In the console, go to IAM & Admin → Organization policies.
- Look for VPC‑related constraints (e.g., constraints that limit use of the
defaultnetwork or enforce custom networks). - Configure policies so that users cannot create resources on the
defaultnetwork (or consider deleting thedefaultnetwork entirely if it’s not needed and safe to do so).
After these steps, all Vertex AI notebook instances you actively use will be attached to non‑default VPC networks.
Using CLI
Using CLI
Below are step‑by‑step GCP CLI instructions to ensure Vertex AI Workbench / Notebook instances no longer use the default VPC network.Assumptions:
Any instance where
If notebooks should be private-only (no external IPs), skip or further restrict these rules and ensure no external IP is assigned when creating instances.
Key flags:
Only do this if you are sure nothing else requires the default VPC.Where
By following these steps, all current and future Vertex AI notebook instances will be created on your custom VPC network instead of the default VPC.
- You have
gcloudinstalled and authenticated. - Replace placeholder values (
PROJECT_ID,REGION,NETWORK_NAME, etc.) with your own.
1. Identify notebooks using the default VPC
Vertex AI Workbench user‑managed notebooks run on Compute Engine VMs. We’ll inspect those VMs’ networks.gceSetup.network is default (or empty and thus implicitly default) must be remediated.2. Create a dedicated VPC network and subnet
3. Add minimal firewall rules for notebook access
Example: allow SSH and HTTPS (adjust to your security policy).4. Create new Vertex AI notebook instances on the custom VPC
You cannot change the network of an existing underlying VM; you must create a new instance that uses the custom VPC.Example: create a new Workbench user‑managed instance:--network=$NETWORK_NAMEensures it is not usingdefault.--subnet=$SUBNET_NAMEpins it to the custom subnet.--no-public-ip(optional but recommended for locked‑down environments).
5. Migrate workloads and delete old instances using the default network
For each old notebook instance ondefault:- Connect and copy data (e.g., using
gsutilto move notebooks to Cloud Storage orscpbetween instances). - Validate that your workloads run correctly on the new instance.
- Delete the old instance:
6. Prevent future use of the default network (optional but recommended)
Option A: Remove/lock down the default network
If no other workloads depend ondefault, you can delete it:Option B: Use org policies
At the org/folder/project level, you can set policies to prevent default network use (requires org admin privileges). Example (conceptual; may need org-level permissions):policy.yaml contains constraints such as:constraints/compute.skipDefaultNetworkCreationconstraints/compute.restrictVpcPeering- (and any internal policy constraining network choices).
By following these steps, all current and future Vertex AI notebook instances will be created on your custom VPC network instead of the default VPC.
Using Python
Using Python
Below is a practical remediation approach using Python:Goal:
No Vertex AI Workbench notebook instance should be attached to the
Make sure:
If you are also using user-managed notebooks (legacy AI Platform Notebooks), adapt similarly using the same client (they are also exposed via
If you specify whether you use managed vs. user-managed notebooks and whether you want disk migration automated, I can provide a more exact Python script tailored to that.
No Vertex AI Workbench notebook instance should be attached to the
default VPC network. Instead, they should use a dedicated/custom VPC.1. Prerequisites
- Your account has permissions:
compute.networkAdmin,notebooks.admin(or similar). GOOGLE_CLOUD_PROJECTenv var is set, or you’ll pass the project ID into the script.
2. Create / Ensure a Custom VPC and Subnet (Python)
If you don’t already have a non-default VPC, create one. Example usesgoogle-api-python-client for Compute:3. Identify Notebook Instances Using the Default Network
For Vertex AI Workbench managed notebooks, usegoogle-cloud-notebooks:notebooks_v1 but under different resource paths).4. Recreate Notebooks on the Custom Network
Network configuration is effectively immutable for Workbench notebook instances, so remediation is:- Capture configuration of existing instance.
- Create a new instance with the same settings but with
network(and optionallysubnet) pointing to your custom VPC. - Migrate data (via attached disks, snapshots, Git, or copying files).
- Delete the old instance.
Note: Data migration strategy depends on how notebooks store data (boot disk, extra data disk, Git repos). Automating disk reattachment is possible but more complex; keep that separate if needed.
5. Enforce Going Forward (Prevent New Use of Default VPC)
For future notebooks:- Ensure your automation or infra-as-code (Terraform, Deployment Manager, custom scripts) always sets
network(andsubnet) explicitly to your custom VPC when callingcreate_instance. - Optionally use Organization Policy / security controls to:
- Restrict use of the default network.
- Require private IP / specific networks for Vertex AI Workbench.
If you specify whether you use managed vs. user-managed notebooks and whether you want disk migration automated, I can provide a more exact Python script tailored to that.
Using Terraform
Using Terraform
network_interface.network / subnetwork of an existing google_notebooks_instance forces replacement of the instance (recreate and potential downtime), so apply carefully.To verify, terraform plan should show either:- creation of a new
google_notebooks_instanceattached toVERTEX_NETWORK, or - replacement of the existing instance where the only network change is from
projects/PROJECT_ID/global/networks/default(or similar) to your customVERTEX_NETWORK.

