diff --git a/src/current/cockroachcloud/connect-to-an-advanced-cluster.md b/src/current/cockroachcloud/connect-to-an-advanced-cluster.md index 3ee938e8994..ff17fbcd743 100644 --- a/src/current/cockroachcloud/connect-to-an-advanced-cluster.md +++ b/src/current/cockroachcloud/connect-to-an-advanced-cluster.md @@ -54,7 +54,9 @@ Private connectivity can be configured only after a cluster is created. - Set **Target** to **Published service**. - Set **Target service** to the value you copied from CockroachDB {{ site.data.products.cloud }} Console. If the endpoint's configured target service does not match, validation will fail. - Provide a value for **Endpoint name**. You will need to provide this **Endpoint name** when connecting to the cluster using the command line, a connection string, or connection parameters. - - If it is not enabled, enable the Service Directory API, click **Enable global access**, and create a namespace in each region where your cluster is deployed. + - If it is not enabled, enable the Service Directory API. Click **Enable global access**, and create a namespace in each region where your cluster is deployed. + + When Service Directory and Global access are enabled, GCP automatically maps your private endpoint IPs to approved DNS names. CockroachDB {{ site.data.products.cloud }} requires DNS names in your connection information to match the approved pattern in your cluster’s certificates. Replace `` in your connection information with the assigned **Endpoint name** used in the previous step. - Click **Add endpoint**. - After the endpoint is created, copy the connection ID. 1. Return to the CockroachDB {{ site.data.products.cloud }} Console browser tab and click **Validate**. @@ -163,7 +165,7 @@ To download a supported version of the SQL shell instead of the full binary, vis 1. Select the **Command Line** tab. 1. If CockroachDB is not installed locally, copy the command to download and install it. In your terminal, run the command. 1. If the CA certificate for the cluster is not downloaded locally, copy the command to download it. In your terminal, run the command. -1. Copy the [`cockroach sql`]({% link {{site.current_cloud_version}}/cockroach-sql.md %}) command, which will be used in the next step (and to connect to your cluster in the future). Click **Close**. +1. Copy the [`cockroach sql`]({% link {{site.current_cloud_version}}/cockroach-sql.md %}) command, which will be used in the next step (and to connect to your cluster in the future). If you are connecting using a private endpoint in GCP, replace `` in the command with the assigned GCP endpoint name. Click **Close**. 1. In your terminal, enter the copied `cockroach sql` command and connection string to start the [built-in SQL client]({% link {{site.current_cloud_version}}/cockroach-sql.md %}). 1. Enter the SQL user's password and enter. @@ -190,7 +192,7 @@ To connect to your cluster from your application: 1. Select the **Connection string** tab. 1. If the CA certificate for the cluster is not downloaded locally, copy the command to download it. In your terminal, run the command. -1. Copy the connection string, which begins with `postgresql://`. This will be used to connect your application to CockroachDB {{ site.data.products.advanced }}. +1. Copy the connection string, which begins with `postgresql://`. This will be used to connect your application to CockroachDB {{ site.data.products.advanced }}. If you are connecting using private endpoint in GCP, replace `` in the connection string with the assigned GCP endpoint name. 1. Add your copied connection string to your application code. For information about connecting to CockroachDB {{ site.data.products.advanced }} with a [supported client]({% link {{ site.current_cloud_version }}/third-party-database-tools.md %}), see [Connect to a CockroachDB Cluster]({% link {{ site.current_cloud_version }}/connect-to-the-database.md %}). 1. Click **Close**. @@ -215,7 +217,7 @@ To connect to your cluster with a [CockroachDB-compatible tool]({% link {{site.c --------------|------------ `{username}` | The [SQL user]({% link cockroachcloud/managing-access.md %}#create-a-sql-user) connecting to the cluster. `{password}` | The password for the SQL user connecting to the cluster. - `{host}` | The host on which the CockroachDB node is running. + `{host}` | The host on which the CockroachDB node is running. If you are connecting using a private endpoint in GCP, replace `` in this connection parameter with the assigned GCP endpoint name. `{port}` | The port at which the CockroachDB node is listening. `{database}` | The name of the (existing) database.