Skip to content

Commit 3a1ab39

Browse files
committed
docs: remove unimplemented TRIGGER_PRIVATE_LINK env var injection from private networking docs
1 parent ee4842b commit 3a1ab39

2 files changed

Lines changed: 18 additions & 29 deletions

File tree

docs/private-networking/aws-console-setup.mdx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ This is the resource that PrivateLink consumers connect to.
138138

139139
</Step>
140140
<Step title="Skip private DNS">
141-
Leave the "Private DNS name" option disabled. Trigger.dev tasks dial the endpoint by IP via
142-
injected environment variables, so private DNS isn't needed.
141+
Leave the "Private DNS name" option disabled. Trigger.dev tasks dial the endpoint by IP or by
142+
its VPC Endpoint DNS name (shown in your dashboard once provisioned), so private DNS isn't
143+
needed.
143144
</Step>
144145
<Step title="Create the endpoint service">
145146
Click **Create**. Note the **Service name** — it looks like `com.amazonaws.vpce.us-east-1.vpce-svc-0123abcd...`.
@@ -187,7 +188,7 @@ By default, no one can connect to your endpoint service. You need to explicitly
187188
<Step title="Pick the I have my details card">
188189
Then fill in:
189190

190-
- **Friendly name**: a short identifier — this becomes the env var name. For `my-postgres` you'll get `TRIGGER_PRIVATE_LINK_MY_POSTGRES`.
191+
- **Friendly name**: a short, human-readable label for this connection.
191192
- **VPC Endpoint Service name**: paste the `com.amazonaws.vpce.<region>.vpce-svc-...` value from Step 4.
192193
- **Target region**: the AWS region your endpoint service lives in.
193194

@@ -197,8 +198,10 @@ By default, no one can connect to your endpoint service. You need to explicitly
197198
Provisioning typically takes 30–90 seconds.
198199
</Step>
199200
<Step title="Verify">
200-
Once **Active**, the dashboard shows the assigned IPs. These are now available in your tasks
201-
via `process.env.TRIGGER_PRIVATE_LINK_<NAME>`.
201+
Once **Active**, the dashboard shows the assigned IPs and a copyable DNS endpoint name. Plug
202+
one of them into the connection-string env var your task already uses (for example,
203+
`DATABASE_URL` set on the **Environment Variables** page) and your tasks will reach the
204+
resource over PrivateLink.
202205
</Step>
203206
</Steps>
204207

docs/private-networking/overview.mdx

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,16 @@ When you add a private connection in the dashboard, the following happens:
4444
<Step title="We provision a VPC Endpoint">
4545
Once you submit the endpoint service name in the Trigger.dev dashboard, we provision a VPC Endpoint in our isolated, customer-PrivateLink AWS account in the region you chose. The endpoint creates ENIs with private IPs that we wire up to reach your service.
4646
</Step>
47-
<Step title="We inject endpoint info into your tasks">
48-
The endpoint's IP addresses are injected as environment variables into the pods that run your tasks. Your task code reads them like any other env var to dial into your resource.
47+
<Step title="Your tasks can reach the endpoint">
48+
Once the connection is **Active**, the dashboard shows the assigned IPs (one per Availability Zone) and a copyable DNS endpoint name. Pods running your tasks are network-authorized to connect to those addresses.
4949
</Step>
5050
</Steps>
5151

5252
### Connecting from your task code
5353

54-
Each connection you create gets a friendly name. We expose its IPs via an environment variable derived from that name:
54+
When the connection becomes **Active**, the dashboard shows the assigned endpoint IPs and a copyable DNS endpoint name that resolves to those IPs from inside our worker network.
5555

56-
```text
57-
TRIGGER_PRIVATE_LINK_<NAME_IN_SCREAMING_SNAKE_CASE>
58-
```
59-
60-
For example, a connection named `my-postgres` produces:
61-
62-
```text
63-
TRIGGER_PRIVATE_LINK_MY_POSTGRES=10.200.1.5,10.200.1.6
64-
```
65-
66-
Use it in your task like any other connection string fragment:
56+
Plug whichever you prefer into the connection-string env var your task already reads (for example, `DATABASE_URL` set in the **Environment Variables** page):
6757

6858
```typescript
6959
import { task } from "@trigger.dev/sdk";
@@ -72,14 +62,10 @@ import { Client } from "pg";
7262
export const queryDatabase = task({
7363
id: "query-database",
7464
run: async () => {
75-
const host = process.env.TRIGGER_PRIVATE_LINK_MY_POSTGRES?.split(",")[0];
76-
65+
// DATABASE_URL is set in the Trigger.dev dashboard to the connection's
66+
// assigned IP or DNS endpoint name shown in Private Connections.
7767
const client = new Client({
78-
host,
79-
port: 5432,
80-
user: process.env.DB_USER,
81-
password: process.env.DB_PASSWORD,
82-
database: "app",
68+
connectionString: process.env.DATABASE_URL,
8369
});
8470

8571
await client.connect();
@@ -92,9 +78,9 @@ export const queryDatabase = task({
9278
```
9379

9480
<Tip>
95-
The variable contains a comma-separated list of IPs (one per Availability Zone). Most database
96-
drivers accept the first IP. For higher availability, parse the list and use a driver that
97-
supports failover.
81+
Connections expose multiple IPs (one per Availability Zone). For higher availability, use a
82+
driver that supports failover or use the DNS endpoint name, which AWS resolves to whichever IPs
83+
are currently healthy.
9884
</Tip>
9985

10086
## Isolation between organizations

0 commit comments

Comments
 (0)