Skip to content

Allow creating secrets from environment variables and files in CLI #2928

Closed
@danielgafni

Description

@danielgafni

Currently the only way to set the secret contents is to pass them in CLI args in plain text.

This is:

  • not ideal locally (the secret value is recorded in the shell history unless special precautions are taken)
  • not acceptable in CI/CD pipelines which commonly display the command being run in the logs

I think the modal secret create command should have an interface to load secret values from environment or filesystem instead.

For example:

modal secret create my-secret MY_VALUE=env://MY_VALUE

modal secret create my-secret MY_VALUE=file:///path/to/value

modal secret create --from-file /path/to/secret.json my-secret

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions