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
envtype, it's the name of the environment variable to use, such asACME_LICENSE_KEY. - For
filetype, it's the relative path to the execution directory for the file, for examplelicenses/acme.lic. Files are stored relative to the execution home directory. You cannot store a secret above the home directory (ie/mydir/myfilewill be located at./mydir/myfilefrom the perspective of your optimization code). The execution directory is considered to be where theapp.yamlmanifest file is located.
- For
- Value: the actual value of the secret. This value must be text, and is
limited to 1 KB.
- For
envtype, the value is the value of the environment variable. - For
filetype, the value is the content of the file.
- For