Running this action requires a Vault token with permission to create secrets.

CreateVaultSecret — creates a secret with one or more values in HashiCorp Vault.

Request example

path: example/data/path
secrets:
  - key: key1
    value: value1
  - key: key2
    value: value2

Request specification

NameRequiredDescriptionPossible valuesDefault value
pathYesPath at which the secret will be stored in Vault-
allow_updateNoDetermines the action’s behavior when creating or updating a secrettrue, false, merge, merge_or_createfalse
secretsYesSet of secrets to create in Vault-
secrets.keyYesName (identifier) of the secret-
secrets.valueYesValue of the secret-

Note

allow_update determines the action’s behavior when creating or updating a secret:

  • false (default) — the action fails with an error if the secret already exists;
  • true — a new version of the secret is created with the values passed to the action;
  • merge — only the secret keys specified in the action are updated or created. Existing keys not mentioned in the action are preserved unchanged. If the secret does not yet exist at the path, the action fails with an error;
  • merge_or_create — behaves like merge if the secret already exists; if the secret does not exist at the path, it is created (a full write of the values from the action).