Secrets

Encrypted secrets allow you to store confidential information in your project.

Secrets are encrypted environment variables that you create in a project. The secrets you create are only available to Fleet Functions that are within the scope of your project.

Creating encrypted secrets for a project

To create secrets for a project you must be the owner of the project or you must have admin access.

  1. In the Fleet Console, navigate to your project page.
  2. From the project menu, click Secrets.
  3. Click Add a new secret.
  4. Type a name for your secret in the Key input box.
  5. Enter the Value for your secret.
  6. Click the Add button.

Accessing your secrets

The secrets are available to your Fleet Functions within the scope of the project through process.env.

const {SECRET_NAME} = process.env;

Limits for secrets

Your project can have up to 100 secrets. You can store encrypted secrets in your Fleet Function and save the decryption passphrase as a secret in the Project.

This limit does not apply to environment variables.