ezgh secrets put <name> [--from-env-file f] [--set K=V]… [--remove K]… [--base N|latest] [--replace] [flags]Write a new version. By default the fields given are changed in a version you build on (--base, latest unless you say a number): --set and --from-env-file add or replace fields, --remove drops them, and every other field is carried over. The write fails with a conflict if the secret changed since the base was read; run the command again.
--replace makes the new version exactly the fields given, dropping every other field (--base and --remove don’t apply).
--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. Values are not printed.
Part of ezgh secrets.
Examples
ezgh secrets put prod/app --set API_KEY=new --remove OLD_KEY
ezgh secrets put prod/app --from-env-file .env --replaceFlags
| Flag | Type | Default | Description |
|---|---|---|---|
--base |
string | latest |
the version to build on: a number, or latest |
--from-env-file |
string | read fields to write from a .env file: KEY=VALUE lines (# comments, export, and quoted values are understood) | |
--remove |
string, repeatable | drop a field (repeat for more) | |
--replace |
boolean | make the new version exactly the fields given, dropping the rest | |
--set |
string, repeatable | set a field: KEY=VALUE, KEY=@file (the file’s bytes) or KEY=- (stdin). Repeat for more |
This command also takes the global flags.