SNOWFLAKE_PASSWORD or private key stored anywhere.
Follow the OIDC prerequisites, then go to the OIDC page for your environment and copy the issuer URL and subject.
Configure Snowflake
Create a service user for each environment. Replace the issuer and subject with the values from the dashboard:OIDC_AUDIENCE_LIST, Snowflake expects the audience snowflakecomputing.com, which the task requests below. SUBJECT can be up to 255 characters, which fits every Trigger.dev subject in practice.
Connect in your task
Workload identity needs the Snowflake Node.js driver withWORKLOAD_IDENTITY support:
authenticator, workloadIdentityProvider, and token:
/trigger/query-snowflake.ts
run and close it before the run ends.
Remove the old credential
Once runs in every deployed environment connect this way, deleteSNOWFLAKE_PASSWORD, SNOWFLAKE_PRIVATE_KEY, SNOWFLAKE_PRIVATE_KEY_PATH, and SNOWFLAKE_PRIVATE_KEY_PASSPHRASE from those environments on the Environment Variables page, then remove the password or key from the old Snowflake user. SNOWFLAKE_ACCOUNT isn’t a secret and can stay.
Local Development runs can’t mint OIDC tokens. Use your own Snowflake login there when ctx.environment.type === "DEVELOPMENT".
