{
  "schema_version": 2,
  "id": "integrate/redis-data-integration/reference/cli/redis-di-set-secret",
  "title": "redis-di set-secret",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/reference/cli/redis-di-set-secret/",
  "summary": "Creates or updates a secret of a pipeline",
  "content": "\nCreates or updates a secret of a pipeline. Secrets hold the credentials and certificates that the\npipeline uses to connect to the source and target databases (see\n[Set secrets](https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/data-pipelines/deploy#set-secrets)\nfor the list of secret names). You can then refer to a secret in the `config.yaml` file with the\nsyntax `${SECRET_NAME}`.\n\nThe secret value comes from the `[value]` argument, the `--file` option, or the `--literal` option.\nIf you provide none of these on an interactive terminal, the command prompts for the value without\nechoing it.\n\n## Usage\n\n```\nredis-di set-secret \u003ckey\u003e [value] [flags]\n```\n\n## Options\n\n| Option             | Description                                                                       |\n| :----------------- | :-------------------------------------------------------------------------------- |\n| `-p`, `--pipeline` | Pipeline to target (default `default`).                                           |\n| `--file`           | Read the secret value from the file at this path.                                 |\n| `--literal`        | Use this literal string as the secret value.                                      |\n| `--wait`           | Wait for the pipeline to reach the expected state (default `true`).               |\n| `--timeout`        | Maximum time to wait for the pipeline to reach the expected state (default `2m`). |\n\nThis command also accepts the\n[global options](https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/reference/cli/redis-di#global-options).\n\n## Example\n\n```bash\n# Value from an argument\nredis-di set-secret SOURCE_DB_USERNAME myuser\n\n# Value from a file (for example, a certificate)\nredis-di set-secret SOURCE_DB_CACERT --file /path/to/myca.crt\n\n# Value read from an interactive prompt\nredis-di set-secret SOURCE_DB_PASSWORD\n```\n",
  "tags": ["redis-di"],
  "last_updated": "2026-09-19T17:55:58-07:00"
}
