inject
1Passwordマニュアル|シークレット参照を活用して、テンプレート化されたファイルに安全かつ効率的にシークレットを挿入する方法をご紹介します。
op inject [flags]Flags
--file-mode filemode Set filemode for the output file. It is ignored without the --out-file flag. (default 0600)
-f, --force Do not prompt for confirmation.
-i, --in-file string The filename of a template file to inject.
-o, --out-file string Write the injected template to a file instead of stdout.echo "db_password: {{ op://app-prod/db/password }}" | op inject
db_password: fX6nWkhANeyGE27SQGhYQcat config.yml.tpl
db_password: {{ op://app-prod/db/password }}op inject -i config.yml.tpl -o config.yml && cat config.yml
db_password: fX6nWkhANeyGE27SQGhYQLast updated