Skip to content

Commit 879996d

Browse files
DOC-4169 add usage examples of secret config props
1 parent 5f8c0f8 commit 879996d

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

content/integrate/redis-data-integration/ingest/data-pipelines/data-pipelines.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ The sections below describe the two types of configuration file in more detail.
6969
## The `config.yaml` file
7070

7171
Here is an example of a `config.yaml` file. Note that the values of the
72-
form "`${name}`" refer to environment variables that are set elsewhere. In particular,
73-
you should normally use environment variables as shown to set the source
74-
username and password rather than storing them in plain text in this
72+
form "`${name}`" refer to environment variables that you should set with the
73+
[`redis-di set-secret`]({{< relref "/integrate/redis-data-integration/ingest/reference/cli/redis-di-set-secret" >}})
74+
command. In particular, you should normally use environment variables as shown to set the source
75+
and target username and password rather than storing them in plain text in this
7576
file (see [Set secrets](#set-secrets) below for more information).
7677

7778
```yaml
@@ -87,6 +88,13 @@ sources:
8788
database: redislabscdc
8889
user: ${SOURCE_DB_USERNAME}
8990
password: ${SOURCE_DB_PASSWORD}
91+
# The names of the following properties should match the ones you used
92+
# when setting the TLS/mTLS secrets. Set only `cacert` if you are using
93+
# TLS, but set all of them if you are using mTLS:
94+
# key: ${SOURCE_DB_KEY}
95+
# cert: ${SOURCE_DB_CERT}
96+
# cacert: ${SOURCE_DB_CACERT}
97+
# key_password: ${SOURCE_DB_KEY_PASSWORD}
9098
tables:
9199
emp:
92100
snapshot_sql: "SELECT * from redislabscdc.emp WHERE empno < 1000"
@@ -114,12 +122,15 @@ targets:
114122
type: redis
115123
host: localhost
116124
port: 12000
117-
# The names of the following files should match the ones you used
125+
user: ${TARGET_DB_USERNAME}
126+
password: ${TARGET_DB_PASSWORD}
127+
# The names of the following properties should match the ones you used
118128
# when setting the TLS/mTLS secrets. Set only `cacert` if you are using
119-
# TLS, but set all three if you are using mTLS:
120-
# key: /etc/certificates/target_db/redis.key
121-
# cert: /etc/certificates/target_db/redis.crt
122-
# cacert: /etc/certificates/target_db/ca.crt
129+
# TLS, but set all of them if you are using mTLS:
130+
# key: ${TARGET_DB_KEY}
131+
# cert: ${TARGET_DB_CERT}
132+
# cacert: ${TARGET_DB_CACERT}
133+
# key_password: ${TARGET_DB_KEY_PASSWORD}
123134
```
124135

125136
The main sections of the file configure [`sources`](#sources) and [`targets`](#targets).
@@ -404,7 +415,10 @@ Before you deploy your pipeline, you must set the authentication secrets for the
404415
source and target databases. Each secret has a corresponding property name that
405416
you can pass to the
406417
[`redis-di set-secret`]({{< relref "/integrate/redis-data-integration/ingest/reference/cli/redis-di-set-secret" >}})
407-
command to set the property's value. For example, you would use the
418+
command to set the property's value. You can then refer to these properties
419+
in `config.yaml` using the syntax "`${PROPERTY_NAME}`"
420+
(the sample [config.yaml file](#the-configyaml-file) shows these properties in use).
421+
For example, you would use the
408422
following command line to set the source database username to `myUserName`:
409423

410424
```bash

0 commit comments

Comments
 (0)