Changelog #62
·
Environment variables SDK
CTO, Trigger.dev
From v3 SDK version 3.0.0-beta.34
we have a fully-featured SDK for managing environment variables as well as a convenient way of syncing them from other services. Read the full docs.
Directly manipulating environment variables
You can directly use SDK functions to manipulate environment variables. Here is a list of available functions:
Function | Description |
---|---|
envvars.list() | List all environment variables |
envvars.upload() | Upload multiple env vars. You can override existing values. |
envvars.create() | Create a new environment variable |
envvars.retrieve() | Retrieve an environment variable |
envvars.update() | Update a single environment variable |
envvars.del() | Delete a single environment variable |
Syncing environment variables from other services
Instead of using the SDK functions above it's much easier to use our resolveEnvVars
function in your trigger.config
file.
In this example we're using env vars from Infisical. You can use this with any secrets manager or environment variable provider.
Read the full docs for the details.