Skip to content

[Config] Secrets decrypt exit option #20055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion configuration/secrets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,20 @@ manually store this file somewhere and deploy it. There are 2 ways to do that:

.. code-block:: terminal

$ APP_RUNTIME_ENV=prod php bin/console secrets:decrypt-to-local --force
$ APP_RUNTIME_ENV=prod php bin/console secrets:decrypt-to-local --force --exit

This will write all the decrypted secrets into the ``.env.prod.local`` file.
After doing this, the decryption key does *not* need to remain on the server(s).

Note the usage of the ``--exit`` option: this forces all secrets to be successfully
decrypted, otherwise a non-zero exit code is returned.

If you wish to continue regardless of errors occurring during decryption, you may omit this option.

.. versionadded:: 7.2

The ``--exit`` option was introduced in Symfony 7.2.

Rotating Secrets
----------------

Expand Down
Loading