Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/modules/vault.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Vault Module

[Vault](https://www.vaultproject.io/) by HashiCorp is a tool for securely accessing secrets such as API keys, passwords, or certificates. This module allows you to run and initialize a Vault container for integration tests.

## Install

```bash
npm install @testcontainers/vault --save-dev
```

## Examples

<!--codeinclude-->
[Start and perform read/write with node-vault:](../../packages/modules/vault/src/vault-container.test.ts) inside_block:readWrite
<!--/codeinclude-->

<!--codeinclude-->
[Run Vault CLI init commands at startup:](../../packages/modules/vault/src/vault-container.test.ts) inside_block:initCommands
<!--/codeinclude-->

## Why use Vault in integration tests?

With the growing adoption of Vault in modern infrastructure, testing components that depend on Vault for secret resolution or encryption can be complex. This module allows:

- Starting a local Vault instance during test runs
- Seeding secrets or enabling engines with Vault CLI
- Validating app behavior with secured data access

Use this module to test Vault-backed workflows without the need for pre-provisioned Vault infrastructure.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ nav:
- Selenium: modules/selenium.md
- ToxiProxy: modules/toxiproxy.md
- Valkey: modules/valkey.md
- Vault: modules/vault.md
- Weaviate: modules/weaviate.md
- Configuration: configuration.md
Loading
Loading