Connect to Google Cloud private endpoints via Astra Portal
To better protect your database connection, you can connect to a private endpoint using Astra Portal.
For details about using API calls instead, see Connect to Google Cloud Private Service Connect with the DevOps API.
This information applies to only serverless databases. Also, private endpoints are available for only intra-region use. The region for your private endpoint in Google Cloud and your Astra DB database must match. |
For pricing related to using private endpoints, see Pricing and billing.
The following roles can manage private endpoints:
-
Organization Administrator
-
Database Administrator
Alternatively, you can use a custom role with permissions to manage private endpoints.
For more, see Google Cloud Private Service Connect.
Prerequisites
-
Access to your existing Google Cloud project.
-
Create your Astra DB database using Astra Portal.
-
Ensure you have permission to manage private endpoints.
-
From the Google Cloud Console, get your Project ID.
-
Create a Google Cloud Console network, subnetwork, and IP address for your private endpoint. For more, see Creating networks. The steps for private endpoints and sample values are listed below.
-
Take note of which region your Google Cloud project and Google Cloud based Astra DB use (the chosen region must match).
To increase your security, restrict public access to your database using the access list. |
Creating and referencing endpoint values between Google Cloud console and Astra Portal
Setting up the connection between Google Cloud and Astra DB private endpoints involves a few steps in both UIs.
Let’s start in Astra Portal
-
On your organization’s Astra DB dashboard, click the link for your active, Google Cloud based database.
-
Navigate to your database’s Settings tab, and notice the Private Endpoints section. At this point, no endpoints have been linked. Example:
-
Click Configure Region and enter your Google Cloud Project ID as listed in Google Cloud Console.
-
After entering your Google Cloud project-ID, click Configure Region.
-
Astra Portal displays an updated Private Endpoints section, which includes a newly generated Service Name.
-
Click Add Endpoint.
-
On Add Private Endpoint, copy the generated Service Name. Example:
In Astra Portal, keep the Add Private Endpoint dialog open. We’ll return here with an Endpoint ID after creating it in Google Cloud Console. Also note the region defined for your database. In this example, it is
us-east4
.
Switch over to Google Cloud Console
Ensure you’re in the Google Cloud project you identified above. Then:
-
Navigate to Private Service Connect.
-
So far in this example, no Google Cloud endpoint has been created:
-
Click + CONNECT ENDPOINT.
-
On the Connect Endpoint dialog, choose or enter:
-
Target: Published service.
-
Target service: Paste in the Service Name value that you copied in Astra Portal.
-
Endpoint name: Enter any name, such as
astra-google-cloud-endpoint
. The name must start with a lowercase letter followed by up to 19 lowercase letters and numbers. -
Network: Enter a network value. In this example, we entered
default
. -
Subnetwork: Enter a subnetwork value, such as
default
. -
IP address: If not already assigned, click CREATE IP ADDRESS. On the form, enter a name such as
static-address
. Have Google Cloud assign the IP address automatically, or choose your own value.Click RESERVE.
-
Region: Google Cloud sets the region from a portion of the Service Name that you pasted into the Target service field above. (Verify that the specified region is what you intended!) In this example, we’re using
us-east4
.
-
-
Click ADD ENDPOINT.
Once accepted, Google Cloud displays data for the added endpoint. Example:

Click the linked name of your newly added Endpoint to display the details screen in Google Cloud Console, and copy the Private Service Connect (PSC) ID. Example:

You’ll need to paste in that PCS ID value in Astra Portal.
Return to Astra Portal
Back in Astra Portal, return to the Add Private Endpoint dialog that’s available from your databases’s Settings.
-
In the Endpoint ID field, paste in the copied PSC ID value. Also enter a brief description of your Astra DB / Google Cloud endpoint.
-
Click Add Endpoint.
Astra DB displays the result. Example:
Your private endpoint is defined. However, notice the warning message if you have not taken further action in your Astra DB Settings.
You’ve set up a private endpoint for this database, but access to your database is still open to the public. Learn how to Manage access lists for public access by using the IP Access List options in Astra Portal Settings. You can enable the Restrict public access toggle, and you can manage endpoints with one or more access lists. |
Create a DNS entry for your private endpoint
You can alias your private endpoint with a DNS record to use as your hostname in the Astra DB secure connect bundle. Here are the steps:
-
Download your secure connect bundle for the region of your choice. Get your latest secure connect bundle.
-
Unzip the secure connect bundle.
-
In
config.json
, copy thehost
key’s value. -
In Google Cloud Console, create a private zone to route traffic to your endpoint IP. Update the domains to use REST and CQL. Examples:
efe451fe-709e-4700-9185-5cf0fd3474a7-2-us-east-1.apps.astra.datastax.com
efe451fe-709e-4700-9185-5cf0fd3474a7-2-us-east-1.db.astra.datastax.com
Once those steps are completed, you can connect to your private endpoint using your updated secure connect bundle. For more, see Drivers for Astra DB.
Remove a private endpoint
In Google Cloud Console:
-
Go to Private Service Connect.
-
Choose the endpoint you want to remove.
-
Choose Delete.
In Astra Portal:
-
Go to the Settings tab for your database.
-
Choose the endpoint you want to remove.
-
Click Delete.
What’s next?
-
Refer to related topics for other cloud providers that are linked from Connect via a private endpoint.
-
Learn how to Manage access lists for public access.
-
For more, see Private Service Connect and the DevOps API reference.