Skip to content

Secret collections

Learn how to manage secrets (create, get, update, delete) and make runs with your tool of choice.

  • CLI: the Nextmv Command Line Interface (CLI).
  • Python SDK: a Software Development Kit (SDK) for Python developers.
  • Cloud API: an HTTP API for developers to integrate with the Nextmv platform.

A secret collection defines one or more secrets used by your optimization model during execution. You can reference a secret collection either in an application instance configuration, or directly when starting a run. The platform then injects the secrets into the container during the optimization run as environment variables and files.

A secret collection can contain up to 20 secrets. Each secret has the following attributes:

  • Type: determines how to inject the secret into the runtime.
    • env: the secret is injected as an environment variable.
    • file: the secret is injected as a file.
  • Location: specifies where to put the secret.
    • For env type, it's the name of the environment variable to use, such as ACME_LICENSE_KEY.
    • For file type, it's the relative path to the execution directory for the file, for example licenses/acme.lic. Files are stored relative to the execution home directory. You cannot store a secret above the home directory (ie /mydir/myfile will be located at ./mydir/myfile from the perspective of your optimization code). The execution directory is considered to be where the app.yaml manifest file is located.
  • Value: the actual value of the secret. This value must be text, and is limited to 1 KB.
    • For env type, the value is the value of the environment variable.
    • For file type, the value is the content of the file.