From 43eed2080a918631e864d97a70496b438f99899b Mon Sep 17 00:00:00 2001 From: devarshishah3 Date: Tue, 11 Mar 2025 23:36:47 -0700 Subject: [PATCH 1/3] Update connect-to-an-advanced-cluster.md Add clarity on when to use GCP endpoint name --- .../cockroachcloud/connect-to-an-advanced-cluster.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/current/cockroachcloud/connect-to-an-advanced-cluster.md b/src/current/cockroachcloud/connect-to-an-advanced-cluster.md index 3ee938e8994..f1f0a30d3a9 100644 --- a/src/current/cockroachcloud/connect-to-an-advanced-cluster.md +++ b/src/current/cockroachcloud/connect-to-an-advanced-cluster.md @@ -54,7 +54,8 @@ 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. If the Service Directory API is not enabled, 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 Cloud requires DNS name in your connection info to match the approved pattern in your cluster’s certificates. With Service Directory and Global Access features enabled, you can simply replace `` in your connection information with the assigned name of the Endpoint name used in the above 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 +164,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). In case you are connecting using 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 +191,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 }}. In case 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 +216,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. In case you are connecting using 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. From 34c2c723df4f8ac672555b86b33f70f453553c28 Mon Sep 17 00:00:00 2001 From: katmayb Date: Wed, 12 Mar 2025 17:05:43 -0400 Subject: [PATCH 2/3] Rebase and edits --- .../cockroachcloud/connect-to-an-advanced-cluster.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/current/cockroachcloud/connect-to-an-advanced-cluster.md b/src/current/cockroachcloud/connect-to-an-advanced-cluster.md index f1f0a30d3a9..0c38d020e56 100644 --- a/src/current/cockroachcloud/connect-to-an-advanced-cluster.md +++ b/src/current/cockroachcloud/connect-to-an-advanced-cluster.md @@ -54,8 +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 the Service Directory API is not enabled, 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 Cloud requires DNS name in your connection info to match the approved pattern in your cluster’s certificates. With Service Directory and Global Access features enabled, you can simply replace `` in your connection information with the assigned name of the Endpoint name used in the above step. + - 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**. @@ -164,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). In case you are connecting using Private Endpoint in GCP, replace `` in the command with the assigned GCP Endpoint name. 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 Private Endpoint in GCP, replace `` in the command with the assigned GCP endpointname. 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. @@ -191,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 }}. In case you are connecting using Private Endpoint in GCP, replace `` in the connection string with the assigned GCP Endpoint name. +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**. @@ -216,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. In case you are connecting using Private Endpoint in GCP, replace `` in this connection parameter with the assigned GCP Endpoint name. + `{host}` | The host on which the CockroachDB node is running. If you are connecting using 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. From 550868c0bb4494d4ba44d47f3d65ac96088e1733 Mon Sep 17 00:00:00 2001 From: Kathryn May <44557882+katmayb@users.noreply.github.com> Date: Thu, 13 Mar 2025 10:01:54 -0400 Subject: [PATCH 3/3] Apply suggestions from code review --- .../cockroachcloud/connect-to-an-advanced-cluster.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/current/cockroachcloud/connect-to-an-advanced-cluster.md b/src/current/cockroachcloud/connect-to-an-advanced-cluster.md index 0c38d020e56..ff17fbcd743 100644 --- a/src/current/cockroachcloud/connect-to-an-advanced-cluster.md +++ b/src/current/cockroachcloud/connect-to-an-advanced-cluster.md @@ -165,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). If you are connecting using Private Endpoint in GCP, replace `` in the command with the assigned GCP endpointname. 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. @@ -192,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 }}. If you are connecting using Private Endpoint in GCP, replace `` in the connection string with the assigned GCP endpoint name. +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**. @@ -217,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. If you are connecting using Private Endpoint in GCP, replace `` in this connection parameter with the assigned GCP endpoint name. + `{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.