Create a private connectivity configuration


In this section, you learn how to create a private connectivity configuration. This type of configuration contains information that Datastream uses to communicate with a data source over a private network (internally within Google Cloud, or with external sources connected over VPN or Interconnect). This communication happens through a Virtual Private Cloud (VPC) peering connection.

A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using internal, private IPv4 addresses. You have a private connectivity-based solution to connect to your source database.

Before you begin

Before you create a private connectivity configuration, make sure that you:

  • Have a VPC network that can peer to Datastream's private network and that doesn't have restrictions on it. For more information on creating this network, see Using VPC Network Peering.
  • Have an available IP range (with a CIDR block of /29) on the VPC network. This can't be an IP range that already exists as a subnet, a Private Service Connection pre-allocated IP range, or any sort of pre-allocated route IP range. Datastream uses this IP range to create a subnet so that it can communicate with the source database. The following table describes valid IP ranges.
Range Description
Private IP addresses RFC 1918 Shared address space RFC 6598 IETF protocol assignments RFC 6890 (TEST-NET-1) (TEST-NET-2) (TEST-NET-3)
Documentation RFC 5737 IPv6 to IPv4 relay (deprecated) RFC 7526 Benchmark testing RFC 2544
  • Verify that the Google Cloud Platform and/or on-premises firewall allows traffic from the selected IP range.
  • If you're using a reverse proxy, verify that you allow ingress traffic from the proxy VM in your VPC network. If you don't, then create an ingress firewall rule that allows traffic on the source database port, and make sure that the IPv4 ranges in the firewall rule are the same as the IP address range allocated when creating the private connectivity resource. You might also need to create an identical egress firewall rule to allow traffic back to Datastream.
  • Are assigned to a role that contains the compute.networks.list permission. This permission gives you the required IAM permissions to list VPC networks in your project. You can find which roles contain this permission by clicking here.

If you're using a Shared VPC, then you must complete the following actions:

  1. On the service project:

    1. Enable the Datastream API.
    2. Obtain the email address used for the Datastream service account. Datastream service accounts are created when you perform one of the following:

      • You create a Datastream resource, such as a connection profile or a stream.
      • You create a private connectivity configuration, select your shared VPC and click Create Datastream Service Account. The service account is created in the host project.

      To obtain the email address used for the Datastream service account, find the Project number in the Google Cloud console home page. The email address of the service account is service-[project_number]

  2. On the host project:

    1. Grant the COMPUTE.NETWORKADMIN Identity and Access Management (IAM) role permission to Datastream's service account.

Create the configuration

  1. Review the required prerequisites to reflect how the environment must be prepared for a private connectivity configuration. For more information about these prerequisites, see Before you begin.

  2. Go to the Private connectivity configurations page in the Google Cloud Console.

    Go to the Private connectivity configurations page


  4. Use the following table to populate the fields of the Configure private connectivity section of the Create private connectivity configuration page:

    Configuration nameEnter the display name of the private connectivity configuration.
    Configuration IDDatastream populates this field automatically based on the configuration name that you enter. You can keep the ID that's auto-generated or change it.

    Select the region where the private connectivity configuration is stored. Private connectivity configurations are saved in a region. Region selection can impact availability if the region experiences downtime.

  5. Use the following table to populate the fields of the Set up connection section of the Create private connectivity configuration page:

    Authorized VPC networkSelect the VPC network that you created in Before you begin.
    Allocate an IP rangeEnter an available IP range on the VPC network. You determined this IP range in Before you begin.
  6. Click CREATE.

After creating a private connectivity configuration, you can view high-level and detailed information about it.