Inject
The inject command can be used to inject secrets into templated files:
secrethub inject [options]
Checkout this guide for a detailed use-case.
Flags
-
-c, --clip
(boolean) - Write the service account configuration to the clipboard instead of stdout. The clipboard is automatically cleared after 45 seconds.
-
-i, --in-file
(string) - The filename of a template file to inject.
-
-o, --out-file
(string) - Write the service account configuration to a file instead of stdout.
--file-mode
- Set filemode for the output file if it does not yet exist. Defaults to
0600
(read and write for current user) and is ignored without the –out-file flag. --template-version
- The template syntax version to be used. The options are
v1
,v2
,latest
orauto
to automatically detect the version. Defaults toauto
. -
-v, --var
(string) - Define the value for a template variable with
VAR=VALUE
, e.g.--var env=prd
You can use multiple flags to set multiple variables. -
-f, --force
(boolean) - Overwrite the output file if it already exists, without prompting for confirmation.
This flag is ignored if no
--out-file
is supplied.