You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/19 21:23:02 UTC

[GitHub] [airflow] ashb commented on a change in pull request #15013: Enable Connection creation from Vault parameters

ashb commented on a change in pull request #15013:
URL: https://github.com/apache/airflow/pull/15013#discussion_r692496427



##########
File path: docs/apache-airflow-providers-hashicorp/secrets-backends/hashicorp-vault.rst
##########
@@ -100,6 +100,46 @@ Verify that you can get the secret from ``vault``:
 The value of the Vault key must be the :ref:`connection URI representation <generating_connection_uri>`
 of the connection object to get connection.
 
+Storing and Retrieving Connections using Connection class representation
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+If you have set ``connections_path`` as ``connections`` and ``mount_point`` as ``airflow``, then for a connection id of
+``smtp_default``, you would want to store your secret as:
+
+.. code-block:: bash
+
+    vault kv put airflow/connections/smtp_default conn_type=smtps login=user password=host host=relay.example.com port=465
+
+Note that the ``Keys`` are parameters of the ``Connection`` class and the ``Value`` their argument.
+
+You can make a ``mount_point`` for ``airflow`` as follows:
+
+.. code-block:: bash
+
+    vault secrets enable -path=airflow -version=2 kv

Review comment:
       Do we need to say this again? Maybe it should be moved to a "setup" section in this doc instead




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org