Skip to content

Commit 736f577

Browse files
authored
Update Infisical instructions to new SDK (#1493)
* Update Infisical instructions to new SDK Current documentation is using old Infisical SDK implementation. New SDK has a different name, and authenticates on a method, not in the class constructor. * Fix import and client secret env
1 parent b7de02e commit 736f577

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/deploy-environment-variables.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,20 @@ In this example we're using env vars from [Infisical](https://infisical.com).
9797
```ts trigger.config.ts
9898
import { defineConfig } from "@trigger.dev/sdk/v3";
9999
import { syncEnvVars } from "@trigger.dev/build/extensions/core";
100-
import { InfisicalClient } from "@infisical/sdk";
100+
import { InfisicalSDK } from "@infisical/sdk";
101101

102102
export default defineConfig({
103103
build: {
104104
extensions: [
105105
syncEnvVars(async (ctx) => {
106-
const client = new InfisicalClient({
107-
clientId: process.env.INFISICAL_CLIENT_ID,
108-
clientSecret: process.env.INFISICAL_CLIENT_SECRET,
106+
const client = new InfisicalSDK();
107+
108+
await client.auth().universalAuth.login({
109+
clientId: process.env.INFISICAL_CLIENT_ID!,
110+
clientSecret: process.env.INFISICAL_CLIENT_SECRET!,
109111
});
110112

111-
const secrets = await client.listSecrets({
113+
const { secrets } = await client.secrets().listSecrets({
112114
environment: ctx.environment,
113115
projectId: process.env.INFISICAL_PROJECT_ID!,
114116
});

0 commit comments

Comments
 (0)