HashiCorp Vault icon

HashiCorp Vault

Interact with HashiCorp Vault to manage secrets

Write Secret

AI-generated

Summary

Write a secret to HashiCorp Vault at a given path within a selected secrets engine.

Inputs

  • Secret Engine (required) — The name of the secrets engine (mount path). Defaults to 'secret'.
  • Secret Path (required) — The path to the secret within the secrets engine.
  • Secret Data (required) — The secret data to write, provided as a JSON object.
  • Additional Fields — Optional request settings.
  • Credentials (required) — HashiCorp Vault API credentials (hashicorpVaultApi).

Output shape

array of items, each containing a json field with the write result

Each input item produces one output item. The json field includes: success (true), path (the secret path), and, when using KV engine v2, metadata (the Vault‑returned metadata).

Examples

Example 1: Store a username/password pair in the default kv secret engine at path 'myapp/database'.

Set Secret Engine to 'secret', Secret Path to 'myapp/database', and Secret Data to { username: 'myuser', password: 'mypassword' }.

Discussion