From 68fc95bea4cb1cd339b56f0af24b8c5251921fd9 Mon Sep 17 00:00:00 2001 From: Ralf Schmitz Bongiolo Date: Fri, 11 Oct 2024 08:13:34 -0400 Subject: [PATCH 1/2] feat(secrets): document Doppler adapter usage --- docs/commands/secrets.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/commands/secrets.md b/docs/commands/secrets.md index 188d03d..17bba2f 100644 --- a/docs/commands/secrets.md +++ b/docs/commands/secrets.md @@ -90,3 +90,22 @@ kamal secrets fetch --adapter bitwarden --account email@example.com MyItem/REGIS kamal secrets extract REGISTRY_PASSWORD kamal secrets extract MyItem/REGISTRY_PASSWORD ``` + +## Doppler + +First, install and configure [the Doppler CLI](https://docs.doppler.com/docs/install-cli). + +Use the adapter `doppler`: + +```bash +# Fetch passwords +kamal secrets fetch --adapter doppler --account my-project/prd REGISTRY_PASSWORD DB_PASSWORD + +# Extract the secret +kamal secrets extract REGISTRY_PASSWORD +kamal secrets extract DB_PASSWORD +``` + +Doppler organizes secrets in "projects" (like `my-awesome-project`) and "configs" (like `prod`, `stg`, etc), use the pattern `project/config` when defining the `--account` option. + +Doppler does not have a concept of folders, so using `--from` option or `FOLDER/SECRET` pattern is not supported and will raise an error. From 535ae4580bea666f410ffa706ef03d512802ea20 Mon Sep 17 00:00:00 2001 From: Ralf Schmitz Bongiolo Date: Thu, 21 Nov 2024 20:06:37 -0400 Subject: [PATCH 2/2] Adjust doppler documentation --- docs/commands/secrets.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/commands/secrets.md b/docs/commands/secrets.md index 17bba2f..0bbade2 100644 --- a/docs/commands/secrets.md +++ b/docs/commands/secrets.md @@ -99,13 +99,16 @@ Use the adapter `doppler`: ```bash # Fetch passwords -kamal secrets fetch --adapter doppler --account my-project/prd REGISTRY_PASSWORD DB_PASSWORD +kamal secrets fetch --adapter doppler --from my-project/prd REGISTRY_PASSWORD DB_PASSWORD + +# The project/config pattern is also supported in this way +kamal secrets fetch --adapter doppler my-project/prd/REGISTRY_PASSWORD my-project/prd/DB_PASSWORD # Extract the secret kamal secrets extract REGISTRY_PASSWORD kamal secrets extract DB_PASSWORD ``` -Doppler organizes secrets in "projects" (like `my-awesome-project`) and "configs" (like `prod`, `stg`, etc), use the pattern `project/config` when defining the `--account` option. +Doppler organizes secrets in "projects" (like `my-awesome-project`) and "configs" (like `prod`, `stg`, etc), use the pattern `project/config` when defining the `--from` option. -Doppler does not have a concept of folders, so using `--from` option or `FOLDER/SECRET` pattern is not supported and will raise an error. +The doppler adapter does not use the `--account` option, if given it will be ignored.