Skip to content

Commit b386b13

Browse files
Add HashiCorp Vault module (#1079)
1 parent 8ed532e commit b386b13

File tree

10 files changed

+672
-0
lines changed

10 files changed

+672
-0
lines changed

docs/modules/vault.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Vault Module
2+
3+
[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.
4+
5+
## Install
6+
7+
```bash
8+
npm install @testcontainers/vault --save-dev
9+
```
10+
11+
## Examples
12+
13+
<!--codeinclude-->
14+
[Start and perform read/write with node-vault:](../../packages/modules/vault/src/vault-container.test.ts) inside_block:readWrite
15+
<!--/codeinclude-->
16+
17+
<!--codeinclude-->
18+
[Run Vault CLI init commands at startup:](../../packages/modules/vault/src/vault-container.test.ts) inside_block:initCommands
19+
<!--/codeinclude-->
20+
21+
## Why use Vault in integration tests?
22+
23+
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:
24+
25+
- Starting a local Vault instance during test runs
26+
- Seeding secrets or enabling engines with Vault CLI
27+
- Validating app behavior with secured data access
28+
29+
Use this module to test Vault-backed workflows without the need for pre-provisioned Vault infrastructure.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,6 @@ nav:
8484
- Selenium: modules/selenium.md
8585
- ToxiProxy: modules/toxiproxy.md
8686
- Valkey: modules/valkey.md
87+
- Vault: modules/vault.md
8788
- Weaviate: modules/weaviate.md
8889
- Configuration: configuration.md

0 commit comments

Comments
 (0)