Skip to content

Commit

Permalink
docs: Refine connection secret support section (#1358)
Browse files Browse the repository at this point in the history
* docs: Refine connection secret support section
  • Loading branch information
nj1973 authored and helensilva14 committed Dec 2, 2024
1 parent 973ad63 commit b38dc87
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions docs/connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,36 @@ To do so simply add the GCS path to the environment i.e
## Using GCP Secret Manager
DVT supports [Google Cloud Secret Manager](https://cloud.google.com/secret-manager) for storing and referencing secrets in your connection configuration.

If the secret-manager flags are present, the remaining connection flags should reference secret names instead of the secret itself. For example,
the following BigQuery connection references a secret with name 'dvt-project-id' stored in project MY-PROJECT.
If the secret-manager flags are present, any of the remaining connection flags can reference secret names instead of the secret itself.

Example 1: A BigQuery connection referencing a secret with name "dvt-project-secret" stored in project `my-project`:
```
data-validation connections add \
--secret-manager-type GCP \
--secret-manager-project-id <MY-PROJECT> \
--secret-manager-project-id my-project \
--connection-name bq BigQuery \
--project-id 'dvt-project-id'
--project-id "dvt-project-secret"
```

Example 2: A PostgreSQL connection referencing a mixture of secrets (for `--host` and `--password`) stored in project `my-project` and simple string tokens:
```
data-validation connections add \
--secret-manager-type GCP \
--secret-manager-project-id my-project \
--connection-name pg Postgres \
--host=pg-host-secret \
--user=dvt_user \
--password=dvt-password-secret \
--database=mydatabase
```

Example 3: An entire Oracle URL stored as a secret with name "dvt-url-secret" stored in project `my-project`:
```
data-validation connections add \
--secret-manager-type GCP \
--secret-manager-project-id my-project \
--connection-name ora_uat Oracle \
--url="dvt-url-secret"
```

## List existing connections
Expand Down

0 comments on commit b38dc87

Please sign in to comment.