Skip to content

ezgh secrets create

Create a secret, with its first version when fields are given.

Updated View as Markdown
ezgh secrets create <name> [--from-env-file .env] [--set K=V]… [--description d] [--tag k=v]… [flags]

Create a secret in the project. <name> is letters, digits and _ . / - (up to 128 characters, starting with a letter or digit), so prod/db is a name. When fields are given, with --from-env-file and --set, they make the secret’s first version; without them the secret starts empty and ezgh secrets put adds a version.

--set KEY=VALUE sets a field; KEY=@file reads the value from a file (a file that isn’t UTF-8 is sent as binary), and KEY=- reads it from stdin. --set wins over --from-env-file.

Part of ezgh secrets.

Examples

ezgh secrets create prod/app --from-env-file .env
ezgh secrets create prod/db --set DATABASE_URL=postgres://… --set TLS_KEY=@key.pem --tag team=data

Flags

Flag Type Default Description
--description string a description
--from-env-file string read the first version’s fields from a .env file: KEY=VALUE lines (# comments, export, and quoted values are understood)
--set string, repeatable set a field: KEY=VALUE, KEY=@file (the file’s bytes) or KEY=- (stdin). Repeat for more
--tag string, repeatable a tag, key=value (repeat for more)

This command also takes the global flags.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close