Skip to content

Commit 6c051ce

Browse files
committed
thomasgauvin: add changelog, changelog-next, updated docs for improved ui hoa experience
1 parent 2f4522a commit 6c051ce

File tree

4 files changed

+56
-5
lines changed

4 files changed

+56
-5
lines changed
145 KB
Loading
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Automatic configuration for private databases on Hyperdrive
3+
description: Hyperdrive now automatically configures your Cloudflare Tunnel to connect to your private database.
4+
products:
5+
- hyperdrive
6+
date: 2025-01-22T18:00:00Z
7+
---
8+
9+
Hyperdrive now automatically configures your Cloudflare Tunnel to connect to your private database.
10+
11+
![Automatic configuration of Cloudflare Access and Service Token in the Cloudflare dashboard for Hyperdrive.](~/assets/images/hyperdrive/configuration/hyperdrive-private-database-automatic-configuration.png)
12+
13+
When creating a Hyperdrive configuration for a private database, you only need to provide your database credentials and set up a Cloudflare Tunnel within the private network where your database is accessible. Hyperdrive will automatically create the Cloudflare Access, Service Token and Policies needed to secure and restrict your Cloudflare Tunnel to the Hyperdrive configuration.
14+
15+
To create a Hyperdrive for a private database, you can follow the [Hyperdrive documentation](/hyperdrive/configuration/connect-to-private-database/). You can still manually create the Cloudflare Access, Service Token and Policies if you prefer.
16+
17+
This feature is available from the Cloudflare dashboard.

src/content/changelogs/hyperdrive.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ productLink: "/hyperdrive/"
55
productArea: Developer platform
66
productAreaLink: /workers/platform/changelog/platform/
77
entries:
8+
- publish_date: "2025-01-28"
9+
title: Hyperdrive automatically configures your Cloudflare Tunnel to connect to your private database.
10+
description: |-
11+
When creating a Hyperdrive configuration for a private database, you only need to provide your database credentials and set up a Cloudflare Tunnel within the private network where your database is accessible.
12+
13+
Hyperdrive will automatically create the Cloudflare Access, Service Token and Policies needed to secure and restrict your Cloudflare Tunnel to the Hyperdrive configuration.
14+
15+
Refer to [documentation on how to configure Hyperdrive to connect to a private database](/hyperdrive/configuration/connect-to-private-database/).
816
- publish_date: "2024-12-11"
917
title: Hyperdrive now caches queries in all Cloudflare locations decreasing cache hit latency by up to 90%
1018
description: |-

src/content/docs/hyperdrive/configuration/connect-to-private-database.mdx

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,30 @@ Your tunnel must be configured to use a public hostname so that Hyperdrive can r
5252
If you are setting up the tunnel through the CLI instead ([locally-managed tunnel](/cloudflare-one/connections/connect-networks/configure-tunnels/local-management/)), you will have to complete these steps manually. Follow the Cloudflare Zero Trust documentation to [add a public hostname to your tunnel](/cloudflare-one/connections/connect-networks/routing-to-tunnel/dns/) and [configure the public hostname to route to the address of your database](/cloudflare-one/connections/connect-networks/configure-tunnels/local-management/configuration-file/).
5353
:::
5454

55-
## 2. Create a service token
55+
## 2. Create and configure Hyperdrive to connect to the Cloudflare Tunnel
56+
57+
To restrict access to the Cloudflare Tunnel to Hyperdrive, a [Cloudflare Access application](/cloudflare-one/applications/) must be configured with a [Policy](/cloudflare-one/policies/) that requires requests to contain a valid [Service Auth token](/cloudflare-one/policies/access/#service-auth).
58+
59+
The Cloudflare dashboard can automatically create and configure the underlying [Cloudflare Access application](/cloudflare-one/applications/), [Service Auth token](/cloudflare-one/policies/access/#service-auth) and [Policy](/cloudflare-one/policies/) on your behalf. Alternatively, you can manually create the Access application and configure the Policies.
60+
61+
<Tabs> <TabItem label="Automatic creation">
62+
63+
### 2.1 Create a Hyperdrive configuration in the Cloudflare dashboard
64+
65+
Create a Hyperdrive configuration in the Cloudflare dashboard to automatically configure Hyperdrive to connect to your Cloudflare Tunnel.
66+
67+
1. In the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers/hyperdrive), navigate to **Storage & Databases > Hyperdrive** and click **Create configuration**.
68+
1. Select **Private database**.
69+
1. In the **Networking details** section, select the tunnel you are connecting to.
70+
1. In the **Networking details** section, select the hostname associated to the tunnel. (If there is no hostname for your database, return to step [1.2. Connect your database using a public hostname](#12-connect-your-database-using-a-public-hostname)).
71+
1. In the **Access Service Authentication Token** section, select **Create new (automatic)**.
72+
1. In the **Access Application** section, select **Create new (automatic)**.
73+
74+
1. In the **Database connection details** section, enter the database **name**, **user**, and **password**.
75+
76+
</TabItem>
77+
<TabItem label="Manual creation">
78+
### 2.1 Create a service token
5679

5780
The service token will be used to restrict requests to the tunnel, and is needed for the next step.
5881

@@ -72,7 +95,7 @@ The service token will be used to restrict requests to the tunnel, and is needed
7295
This is the only time Cloudflare Access will display the Client Secret. If you lose the Client Secret, you must regenerate the service token.
7396
:::
7497

75-
## 3. Create an Access application to secure the tunnel
98+
### 2.2 Create an Access application to secure the tunnel
7699

77100
[Cloudflare Access](/cloudflare-one/policies/access/) will be used to verify that requests to the tunnel originate from Hyperdrive using the service token created above.
78101

@@ -110,7 +133,7 @@ The service token will be used to restrict requests to the tunnel, and is needed
110133

111134
17. Save the application.
112135

113-
## 4. Create a Hyperdrive configuration
136+
### 2.3 Create a Hyperdrive configuration
114137

115138
To create a Hyperdrive configuration for your private database, you'll need to specify the Access application and Cloudflare Tunnel information upon creation.
116139

@@ -152,7 +175,9 @@ In addition, it will also set the Access Client ID and the Access Client Secret
152175
When creating the Hyperdrive configuration for the private database, you must enter the `access-client-id` and the `access-client-id`, and omit the `port`. Hyperdrive will route database messages to the public hostname of the tunnel, and the tunnel will rely on its service configuration (as configured in [1.2. Connect your database using a public hostname](#12-connect-your-database-using-a-public-hostname)) to route requests to the database within your private network.
153176
:::
154177

155-
## 5. Query your Hyperdrive configuration from a Worker (optional)
178+
</TabItem> </Tabs>
179+
180+
## 3. Query your Hyperdrive configuration from a Worker (optional)
156181

157182
To test your Hyperdrive configuration to the database using Cloudflare Tunnel and Access, use the Hyperdrive configuration ID in your Worker and deploy it.
158183

@@ -177,4 +202,5 @@ If you successfully receive the list of `pg_tables` from your database when you
177202
## Troubleshooting
178203

179204
If you encounter issues when setting up your Hyperdrive configuration with tunnels to a private database, consider these common solutions, in addition to [general troubleshooting steps](/hyperdrive/observability/troubleshooting/) for Hyperdrive:
180-
* Ensure your database is configured to use TLS (SSL). Hyperdrive requires TLS (SSL) to connect.
205+
206+
- Ensure your database is configured to use TLS (SSL). Hyperdrive requires TLS (SSL) to connect.

0 commit comments

Comments
 (0)