Skip to content

Commit 2323909

Browse files
committed
minor nits
1 parent 8cf3b1f commit 2323909

File tree

7 files changed

+21
-24
lines changed

7 files changed

+21
-24
lines changed

src/content/docs/workers-vpc/api/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ A VPC Service binding is accessed via the `env` parameter in your Worker's fetch
2626
Makes an HTTP request to the private service through the configured tunnel.
2727

2828
```js
29-
const response = await env.VPC_SERVICE_BINDING.fetch(url, options);
29+
const response = await env.VPC_SERVICE_BINDING.fetch(resource, options);
3030
```
3131

3232
### Parameters
3333

34-
- `url` (string | URL | Request) - The URL to fetch. This must be an absolute URL including protocol, host, and path (for example, `http://internal-api:8080/api/users`)
34+
- `resource` (string | URL | Request) - The URL to fetch. This must be an absolute URL including protocol, host, and path (for example, `http://internal-api:8080/api/users`)
3535
- `options` (optional RequestInit) - Standard fetch options including:
3636
- `method` - HTTP method (GET, POST, PUT, DELETE, etc.)
3737
- `headers` - Request headers
@@ -44,7 +44,7 @@ VPC Service fetch requests must use absolute URLs including the protocol (http/h
4444

4545
### Return value
4646

47-
Returns a `Promise<Response>` that resolves to a standard Fetch API Response object.
47+
Returns a `Promise<Response>` that resolves to a [standard Fetch API Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response).
4848

4949
### Examples
5050

src/content/docs/workers-vpc/configuration/tunnel/hardware-requirements.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For production use cases, we recommend the following baseline configuration:
1414
- Run a cloudflared replica on two dedicated host machines per network location. Using two hosts enables server-side redundancy. See [tunnel availability and replicas](/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-availability/) for setup instructions.
1515
- Size each host with minimum 4GB of RAM and 4 CPU cores.
1616

17-
This setup is usually sufficient to handle traffic from small-medium sized applications. The actual amount of resources used by cloudflared will depend on many variables, including the number of requests per second, bandwidth, network path, and hardware. As additional users are onboarded, or if network traffic increases beyond your existing tunnel capacity, you can scale your tunnel by adding an additional cloudflared host in that location.
17+
This setup is usually sufficient to handle traffic from small-medium sized applications. The actual amount of resources used by cloudflared will depend on many variables, including the number of requests per second, bandwidth, network path, and hardware. If usage increases beyond your existing tunnel capacity, you can scale your tunnel by increasing the hardware allocated to the cloudflared hosts.
1818

1919
## Capacity calculator
2020

src/content/docs/workers-vpc/configuration/tunnel/index.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ Cloudflare Tunnels can be created one of two ways:
2828

2929
For Workers VPC, we recommend creating a remotely-managed tunnel through the dashboard. Follow the [Tunnels for Workers VPC dashboard setup guide](/workers-vpc/get-started/) to create your tunnel with provided installation commands shown in the dashboard.
3030

31-
For locally-managed tunnels, refer to the [`cloudflared` locally-managed tunnels](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/) guide.
32-
33-
For manual installation, refer to the [`cloudflared` downloads page](/cloudflare-one/connections/connect-networks/downloads/) for platform-specific installation instructions.
31+
For locally-managed tunnels, refer to the [`cloudflared` locally-managed tunnels](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/) guide. For manual installation, refer to the [`cloudflared` downloads page](/cloudflare-one/connections/connect-networks/downloads/) for platform-specific installation instructions.
3432

3533
:::note[Important Note]
3634
Cloudflare Tunnels can either be configured for usage with [Cloudflare Zero Trust](/cloudflare-one/) or [Workers VPC](/workers-vpc/).

src/content/docs/workers-vpc/configuration/vpc-services.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ A VPC Service consists of:
3737

3838
## Configuration example
3939

40-
The following is an example of a VPC Service for a service using custom HTTP and HTTPS ports, and both IPv4 and IPv6 addresses.
40+
The following is an example of a VPC Service for a service using custom HTTP and HTTPS ports, and both IPv4 and IPv6 addresses. These configurations represent the expected contract of the [REST API for creating a VPC Service](https://developers.cloudflare.com/api/resources/zero_trust/subresources/connectivity/subresources/directory/subresources/services/), a type of service within the broader connectivity directory.
4141

4242
```json
4343
{

src/content/docs/workers-vpc/examples/private-api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ This example demonstrates how to access a private REST API that is not exposed t
99

1010
## Prerequisites
1111

12-
- A private API running in your VPC/VNet
13-
- Cloudflare Tunnel configured and running
12+
- A private API running in your VPC/virtual network
13+
- Cloudflare Tunnel configured and running (follow the [Get Started guide](/workers-vpc/get-started/) to set up)
1414
- Workers account with Workers VPC access
1515

1616
## 1. Create the VPC Service

src/content/docs/workers-vpc/get-started.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ cd workers-vpc-app
6262

6363
## 2. Set up Cloudflare Tunnel
6464

65-
A Cloudflare Tunnel creates a secure connection from your private network to Cloudflare. This tunnel will allow Workers to securely access your private resources.
65+
A Cloudflare Tunnel creates a secure connection from your private network to Cloudflare. This tunnel will allow Workers to securely access your private resources. You can create the tunnel on a virtual machine or container in your external cloud, or even on your local desktop for the sake of this tutorial.
6666

6767
<Steps>
6868

@@ -159,7 +159,7 @@ main = "src/index.ts"
159159
compatibility_date = "2024-01-01"
160160

161161
[[vpc_services]]
162-
binding = "PRIVATE_API"
162+
binding = "VPC_SERVICE"
163163
service_id = "<YOUR_SERVICE_ID>"
164164

165165
````

src/content/docs/workers-vpc/index.mdx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Securely connect your private cloud to Cloudflare to build cross-cloud apps.
2828

2929
Workers VPC allows you to connect your Workers to your private APIs and services in external clouds (AWS, Azure, GCP, on-premise, etc.) that are not accessible from the public Internet.
3030

31-
With Workers VPC, you can configure a [Cloudflare Tunnel](/cloudflare-one/connections/connect-networks/) to establish secure, private connections from your private networks to Cloudflare. Then, you can configure a [VPC Service](/workers-vpc/configuration/vpc-services/) for each service in the external private network you need to connect to, and using [VPC Service bindings](/workers-vpc/api/) to connect from Workers.
31+
With Workers VPC, you can configure a [Cloudflare Tunnel](/cloudflare-one/connections/connect-networks/) to establish secure, private connections from your private networks to Cloudflare. Then, you can configure a [VPC Service](/workers-vpc/configuration/vpc-services/) for each service in the external private network you need to connect to, and use [VPC Service bindings](/workers-vpc/api/) to connect from Workers.
3232

3333
:::note
3434

@@ -46,17 +46,16 @@ export default {
4646
"http://internal-api.company.local/data",
4747
);
4848

49-
// Process the response from your private network
50-
const data = await response.json();
51-
52-
return new Response(JSON.stringify(data), {
53-
headers: { "content-type": "application/json" },
54-
});
55-
},
49+
// Process the response from your private network
50+
const data = await response.json();
5651

52+
return new Response(JSON.stringify(data), {
53+
headers: { "content-type": "application/json" },
54+
});
55+
},
5756
};
5857

59-
```
58+
````
6059

6160
</TabItem>
6261
<TabItem label="wrangler.jsonc">
@@ -74,20 +73,20 @@ export default {
7473
}
7574
]
7675
}
77-
```
76+
````
7877
7978
</TabItem>
8079
</Tabs>
8180
8281
## Use cases
8382
84-
### Applications on Workers with access to private APIs
83+
### Access private APIs from Workers applications
8584
8685
Deploy APIs or full-stack applications to Workers that connect to private authentication services, CMS systems, internals APIs, and more. Your Workers applications run globally with optimized access to the backend services of your private network.
8786
8887
### API gateway
8988
90-
Route requests to internal microservices in your private network based on URL paths. Centralize access control and load balancing for multiple private services.
89+
Route requests to internal microservices in your private network based on URL paths. Centralize access control and load balancing for multiple private services on Workers.
9190
9291
### Internal tooling, agents, dashboards
9392

0 commit comments

Comments
 (0)