🚨 AtomicJar is now part of Docker 🐋! Read the blog

Documentation

Java Go

Description

HashiCorp Vault is an identity-based secrets and encryption management system for storing API encryption keys, passwords, and certificates.

Examples

Dependency:
<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>vault</artifactId>
    <version>1.20.0</version>
    <scope>test</scope>
</dependency>
Usage:
var vault = new VaultContainer<>(DockerImageName.parse("hashicorp/vault:1.13.0"));
vault.start();
Dependency:
go get github.com/testcontainers/testcontainers-go/modules/vault
Usage:
vaultContainer, err := vault.Run(ctx,
  "hashicorp/vault:1.13.0",
  vault.WithToken("root-token"),
  vault.WithInitCommand("secrets enable transit", "write -f transit/keys/my-key"),
  vault.WithInitCommand("kv put secret/test1 foo1=bar1"),
)