# HashiCorp Vault

> Use HashiCorp Vault's secrets in workflows: read a secret or one key of it, store and update secrets, list them, see and restore their versions, encrypt and decrypt with Transit, and make strong passwords. Start a workflow when a secret is created or updated, or is due for rotation.

App · 12 actions. Web page: https://docs.lodol.com/docs/integrations/hashicorp-vault

## Actions

### Check server health

Check that Vault is up, initialized and unsealed, and whether this server is active or a standby, with its version.

**Inputs**: None.

**Outputs**

- `cluster_name` (text): The cluster's name
- `enterprise` (true/false): True for Vault Enterprise or HCP Vault
- `initialized` (true/false): True once Vault has been initialized
- `ready` (true/false): True when it is unsealed and answering
- `sealed` (true/false): True while Vault is sealed and can't be used
- `server_time` (text): The server's clock
- `standby` (true/false): True on a standby server
- `status` (text): active, standby, performance standby, sealed, not initialized or DR secondary
- `version` (text): Vault's version, such as 1.21.0

**Example output**

```json
{
  "cluster_name": "vault-cluster-c3c5adc2",
  "enterprise": false,
  "initialized": true,
  "ready": true,
  "sealed": false,
  "server_time": "2026-11-06T10:00:00+00:00",
  "standby": false,
  "status": "active",
  "version": "1.21.0"
}
```

### Decrypt text

Decrypt text that 'Encrypt text' (or anything else using the same Transit key) encrypted; it starts with vault:v. The value is in the step's result for later steps, so anyone who can see this workflow's runs can see it; the run's summary doesn't print it.

**Inputs**

- Transit engine (`transit_mount`, text, required): The Transit secrets engine, such as transit.
- Key (`key`, text, required): The Transit key to use, such as orders.
- Encrypted text (`ciphertext`, text, required): The encrypted text, starting with vault:v.

**Outputs**

- `is_text` (true/false): False when the result wasn't text and is given as base64
- `key` (text): The Transit key used
- `key_version` (number): The key version the text was encrypted with
- `plaintext` (text): The decrypted text (base64 when it isn't text)
- `transit_mount` (text): The Transit engine

**Example output**

```json
{
  "is_text": true,
  "key": "orders",
  "key_version": 1,
  "plaintext": "4111 1111 1111 1111",
  "transit_mount": "transit"
}
```

### Delete secret

Delete a secret's current version or the versions you name, which 'Restore secret versions' can bring back; or destroy versions, or the whole secret with its history, for good.

**Inputs**

- Secrets engine (`mount`, text, required): The key/value secrets engine the secret is in, such as secret.
- Secret path (`path`, text, required): Where the secret is in the engine, such as apps/billing/db.
- How (`how`, text): What to delete. Only the first two can be restored. One of: `latest` (Delete the current version (can be restored)), `versions` (Delete these versions (can be restored)), `destroy` (Destroy these versions for good), `everything` (Delete the secret and all its versions for good). Default: `latest`.
- Versions (`versions`, text): The version numbers, such as 2 or 1, 3. Only when How is Delete these versions (can be restored) or Destroy these versions for good.

**Outputs**

- `can_restore` (true/false): True when 'Restore secret versions' can bring them back
- `how` (text): latest, versions, destroy or everything
- `mount` (text): The secrets engine, such as secret
- `name` (text): The last part of its path, such as db
- `path` (text): The secret's path in the engine, such as apps/billing/db
- `permanent` (true/false): True when they are gone for good
- `versions` (list): The versions deleted or destroyed

**Example output**

```json
{
  "can_restore": true,
  "how": "latest",
  "mount": "secret",
  "name": "db",
  "path": "apps/billing/db",
  "permanent": false,
  "versions": [
    3
  ]
}
```

### Encrypt text

Encrypt text with a Transit key, such as a card number or a note to store elsewhere. Only Vault can decrypt it, with the same key.

**Inputs**

- Transit engine (`transit_mount`, text, required): The Transit secrets engine, such as transit.
- Key (`key`, text, required): The Transit key to use, such as orders.
- Text (`plaintext`, text, required): The text to encrypt.

**Outputs**

- `ciphertext` (text): The encrypted text, starting with vault:v and the key version
- `key` (text): The Transit key used
- `key_version` (number): The version of the key used
- `transit_mount` (text): The Transit engine

**Example output**

```json
{
  "ciphertext": "vault:v1:8SDd3WHDOjf7mq69CyCqYjBXAiQQAVZRkFM13ok481zoCmHnSeDX9vyf7w==",
  "key": "orders",
  "key_version": 1,
  "transit_mount": "transit"
}
```

### Generate random value

Make a strong random password, or random bytes as hex or base64 for a key, from Vault's own randomness; or a password by one of your Vault's password policies. The value is in the step's result for later steps, so anyone who can see this workflow's runs can see it; the run's summary doesn't print it.

**Inputs**

- Kind of value (`value_format`, text): A password, or random bytes written as hex or base64. One of: `password`, `hex`, `base64`. Default: `password`.
- Length (`length`, number): Characters in a password (8 to 256, 32 if blank), or bytes of hex or base64 (up to 1024, 32 if blank). From 1 to 1024.
- Include symbols (`symbols`, true/false): Use symbols (!#$%&*+-=?@^_) in the password as well as letters and digits. Only when Kind of value is Password. Default: `true`.
- Password policy (`password_policy`, text): The name of a password policy in your Vault to follow instead, such as active-directory. Leave blank for Lodol's. Only when Kind of value is Password.

**Outputs**

- `length` (number): Characters in a password, or bytes of a hex or base64 value
- `value` (text): The random value
- `value_format` (text): password, hex or base64

**Example output**

```json
{
  "length": 32,
  "value": "q7R!fK2m#Xw9pL4t@Vz8sN1c-Hj6Bd3Y",
  "value_format": "password"
}
```

### Get secret versions

See a secret's versions without reading its values: which is current, when each was written, and which are deleted or destroyed, with its custom metadata.

**Inputs**

- Secrets engine (`mount`, text, required): The key/value secrets engine the secret is in, such as secret.
- Secret path (`path`, text, required): Where the secret is in the engine, such as apps/billing/db.

**Outputs**

- `cas_required` (true/false): True when every write must name the version it replaces
- `created_time` (text): When the secret was first written
- `current_state` (text): The newest version's state: kept, deleted or destroyed
- `current_version` (number): The newest version
- `custom_metadata` (object): The secret's custom metadata, such as its owner
- `delete_version_after` (text): How long a version is kept before Vault deletes it, such as 2160h0m0s; 0s for always
- `link` (text): A link to the secret in Vault
- `max_versions` (number): How many versions it keeps; 0 for the engine's setting
- `mount` (text): The secrets engine, such as secret
- `name` (text): The last part of its path, such as db
- `oldest_version` (number): The oldest version Vault still keeps
- `path` (text): The secret's path in the engine, such as apps/billing/db
- `updated_time` (text): When it last changed
- `versions` (list): Its versions, newest first

**Example output**

```json
{
  "cas_required": false,
  "created_time": "2026-06-01T08:00:00+00:00",
  "current_state": "kept",
  "current_version": 3,
  "custom_metadata": {
    "owner": "billing-team"
  },
  "delete_version_after": "0s",
  "link": "https://vault.example.com:8200/ui/vault/secrets/secret/kv/apps%2Fbilling%2Fdb",
  "max_versions": 0,
  "mount": "secret",
  "name": "db",
  "oldest_version": 1,
  "path": "apps/billing/db",
  "updated_time": "2026-10-02T09:15:04+00:00",
  "versions": [
    {
      "created_time": "2026-10-02T09:15:04+00:00",
      "deletion_time": "",
      "destroyed": false,
      "state": "current",
      "version": 3
    },
    {
      "created_time": "2026-08-14T12:30:00+00:00",
      "deletion_time": "2026-10-02T09:16:00+00:00",
      "destroyed": false,
      "state": "deleted",
      "version": 2
    },
    {
      "created_time": "2026-06-01T08:00:00+00:00",
      "deletion_time": "",
      "destroyed": true,
      "state": "destroyed",
      "version": 1
    }
  ]
}
```

### List secrets

List the secrets in a folder of a secrets engine, and its folders, or every secret under it. Values aren't read.

**Inputs**

- Secrets engine (`mount`, text, required): The key/value secrets engine the secret is in, such as secret.
- Folder (`folder`, text): The folder to list, such as apps/billing. Leave blank for the top of the engine.
- Include subfolders (`include_subfolders`, true/false): List the secrets in every folder under it too, up to 500. Default: `false`.

**Outputs**

- `count` (number): How many secrets are listed
- `folder` (text): The folder listed; empty for the top
- `folders` (list): The folders found, such as apps/billing
- `mount` (text): The secrets engine
- `secrets` (list): The secrets, in order of their paths
- `truncated` (true/false): True when there were more than Lodol lists at once

**Example output**

```json
{
  "count": 2,
  "folder": "apps",
  "folders": [
    "apps/billing"
  ],
  "mount": "secret",
  "secrets": [
    {
      "folder": "apps/billing",
      "link": "https://vault.example.com:8200/ui/vault/secrets/secret/kv/apps%2Fbilling%2Fdb",
      "name": "db",
      "path": "apps/billing/db"
    },
    {
      "folder": "apps/billing",
      "link": "https://vault.example.com:8200/ui/vault/secrets/secret/kv/apps%2Fbilling%2Fstripe",
      "name": "stripe",
      "path": "apps/billing/stripe"
    }
  ],
  "truncated": false
}
```

### Look up token

See the connection's token: its policies, and when it expires unless renewed. Lodol renews a renewable token as it uses it.

**Inputs**: None.

**Outputs**

- `accessor` (text): The token's accessor, which names it without being it
- `display_name` (text): The token's name, such as token-lodol
- `expire_time` (text): When it expires unless renewed; empty if it never does
- `expires_in_days` (number): Days until it expires; empty if it never does
- `issue_time` (text): When it was made
- `namespace` (text): The connection's namespace; empty for none
- `never_expires` (true/false): True for a token with no expiry, such as a root token
- `orphan` (true/false): True when it doesn't end with the token that made it
- `period_days` (number): A periodic token's period in days; 0 if it isn't one
- `policies` (list): The policies it has, such as default and lodol
- `renewable` (true/false): True when it can be renewed (Lodol renews it as it's used)
- `ttl_seconds` (number): Seconds it has left

**Example output**

```json
{
  "accessor": "FXpzhkV8ss78ymKec0HGp98b",
  "display_name": "token-lodol",
  "expire_time": "2026-12-08T23:54:27+00:00",
  "expires_in_days": 32.0,
  "issue_time": "2026-11-06T23:54:27+00:00",
  "namespace": "",
  "never_expires": false,
  "orphan": true,
  "period_days": 32.0,
  "policies": [
    "default",
    "lodol"
  ],
  "renewable": true,
  "ttl_seconds": 2764800
}
```

### Read secret

Read a secret's keys and values, or one key's value such as a password, to use in a later step; the current version or an earlier one. The value is in the step's result for later steps, so anyone who can see this workflow's runs can see it; the run's summary doesn't print it.

**Inputs**

- Secrets engine (`mount`, text, required): The key/value secrets engine the secret is in, such as secret.
- Secret path (`path`, text, required): Where the secret is in the engine, such as apps/billing/db.
- Key (`key`, text): Only this key's value, such as password. Leave blank for every key.
- Version (`version`, number): An earlier version to read. Leave blank for the current one. At least 1.

**Outputs**

- `created_time` (text): When that version was written
- `custom_metadata` (object): The secret's custom metadata, if any
- `data` (object): Every key of the secret with its value, such as username and password
- `key` (text): The key asked for, if one was
- `keys` (list): The secret's key names
- `link` (text): A link to the secret in Vault
- `mount` (text): The secrets engine, such as secret
- `name` (text): The last part of its path, such as db
- `path` (text): The secret's path in the engine, such as apps/billing/db
- `value` (text): That key's value, when a key was asked for; otherwise empty
- `version` (number): The version read

**Example output**

```json
{
  "created_time": "2026-10-02T09:15:04+00:00",
  "custom_metadata": {
    "owner": "billing-team"
  },
  "data": {
    "password": "Xy7#pQ2m!vR9",
    "username": "billing"
  },
  "key": "password",
  "keys": [
    "password",
    "username"
  ],
  "link": "https://vault.example.com:8200/ui/vault/secrets/secret/kv/apps%2Fbilling%2Fdb",
  "mount": "secret",
  "name": "db",
  "path": "apps/billing/db",
  "value": "Xy7#pQ2m!vR9",
  "version": 3
}
```

### Restore secret versions

Bring back deleted versions of a secret, such as one deleted by mistake. Destroyed versions can't be restored.

**Inputs**

- Secrets engine (`mount`, text, required): The key/value secrets engine the secret is in, such as secret.
- Secret path (`path`, text, required): Where the secret is in the engine, such as apps/billing/db.
- Versions (`versions`, text): The version numbers to restore, such as 3 or 2, 3. Leave blank for the current version.

**Outputs**

- `current_version` (number): The secret's newest version
- `link` (text): A link to the secret in Vault
- `mount` (text): The secrets engine, such as secret
- `name` (text): The last part of its path, such as db
- `path` (text): The secret's path in the engine, such as apps/billing/db
- `versions` (list): The versions restored

**Example output**

```json
{
  "current_version": 3,
  "link": "https://vault.example.com:8200/ui/vault/secrets/secret/kv/apps%2Fbilling%2Fdb",
  "mount": "secret",
  "name": "db",
  "path": "apps/billing/db",
  "versions": [
    3
  ]
}
```

### Update secret keys

Set some keys of a secret, such as a new password, and remove others, keeping the rest as they are. It makes a new version.

**Inputs**

- Secrets engine (`mount`, text, required): The key/value secrets engine the secret is in, such as secret.
- Secret path (`path`, text, required): Where the secret is in the engine, such as apps/billing/db.
- Keys to set (`data`, object): Each key to set and its new value, such as password. Keys not named keep their values.
- Keys to remove (`remove_keys`, text): Keys to take out of the secret, separated by commas, such as old_password.

**Outputs**

- `created_time` (text): When it was written
- `keys` (list): The keys written
- `link` (text): A link to the secret in Vault
- `mount` (text): The secrets engine, such as secret
- `name` (text): The last part of its path, such as db
- `path` (text): The secret's path in the engine, such as apps/billing/db
- `removed_keys` (list): The keys removed
- `version` (number): The version the write made

**Example output**

```json
{
  "created_time": "2026-11-06T10:00:00+00:00",
  "keys": [
    "password"
  ],
  "link": "https://vault.example.com:8200/ui/vault/secrets/secret/kv/apps%2Fbilling%2Fdb",
  "mount": "secret",
  "name": "db",
  "path": "apps/billing/db",
  "removed_keys": [
    "old_password"
  ],
  "version": 4
}
```

### Write secret

Save keys and values as a secret, such as an API key from a sign-up or a password changed elsewhere. A secret already at the path gets a new version with exactly these keys; earlier versions are kept.

**Inputs**

- Secrets engine (`mount`, text, required): The key/value secrets engine the secret is in, such as secret.
- Secret path (`path`, text, required): Where the secret is in the engine, such as apps/billing/db.
- Keys and values (`data`, object, required): Each key and its value, such as username and password.
- Only if new (`only_if_new`, true/false): Refuse to write when a secret is already at this path, so nothing is overwritten. Default: `false`.

**Outputs**

- `created_time` (text): When it was written
- `keys` (list): The keys written
- `link` (text): A link to the secret in Vault
- `mount` (text): The secrets engine, such as secret
- `name` (text): The last part of its path, such as db
- `path` (text): The secret's path in the engine, such as apps/billing/db
- `version` (number): The version the write made

**Example output**

```json
{
  "created_time": "2026-11-06T10:00:00+00:00",
  "keys": [
    "password",
    "username"
  ],
  "link": "https://vault.example.com:8200/ui/vault/secrets/secret/kv/apps%2Fbilling%2Fdb",
  "mount": "secret",
  "name": "db",
  "path": "apps/billing/db",
  "version": 4
}
```
