You can choose to create an Automatic mode or Custom mode Virtual Private Cloud (VPC) network. Automatic mode networks create one subnet in each Google Cloud region automatically when you create the network. For Custom mode VPC networks, you have to create a network and then create subnets that you want within a region. You can create subnets when you create the network or you can add subnets later, but you cannot create instances in a region that has no subnet defined.

Prerequisites

Ensure you have a Google account and access/login information to the Google Cloud Platform (GCP) Console.

Procedure

  1. Log on to the GCP Console.
  2. Click VPC Networks.
    The VPC Networks page appears.
  3. Click Create VPC network.
    The Create a VPC network page appears.
  4. In the Name textbox, enter a unique name for the VPC network.
  5. Under Subnets, choose Custom or Automatic as the Subnet creation mode. If you choose Custom, then in the New subnet area, specify the following configuration parameters for a subnet:
    1. In the Name textbox, enter a unique name for the subnet.
    2. From the Region drop-down menu, select a region for the subnet.
    3. In the IP address range textbox, enter an IP address range.
    4. To define a secondary IP range for the subnet, click Create secondary IP range.
    5. Private Google access: Choose whether to activate Private Google Access for the subnet when you create it or later by editing it.
    6. Flow logs: Choose whether to activate VPC flow logs for the subnet when you create it or later by editing it.
    7. Click Done.
  6. To add more subnets, click Add subnet and repeat the steps in Step 5. You can also add more subnets to the network after you have created the network.
  7. Choose the Dynamic routing mode for the VPC network.
  8. Click Create.

Results

The VPC network and subnet are created.

What to do next

Create Firewall rules for VPC networks.