secret#

async idem_vault.states.vault.secrets.kv_v1.secret.present(hub, ctx, name: str, *, resource_id: (<class 'str'>, 'alias=path'), data: str, disable_read: bool = False) Dict[source]#

Creates or updates a secret stored with Vault KV_v1 secret engine.

Parameters:
  • name (str) – An Idem name of the resource.

  • resource_id (str) – The full logical path to write the data. This argument can also be specified using the alias “path.” This should be prefixed with ‘secret/’.

  • data (str or dict, Optional) – Data to be written in the format of a JSON string or a JSON object that can be stringfied.

  • disable_read (bool, Optional) – Set this field to True if the vault authentication does not have read access. However, if the value is True, this Idem state operation is not idempotent, and Idem state comment output will always assume it is a “create” operation. Defaults to False.

Request Syntax:
[vault-secret-name]:
  vault.secrets.kv_v1.secret.present:
    - resource_id: 'string' # Can also be specified as "path"
    - data: 'string or dict'
    - disable_read: 'boolean'
Returns:

Dict[str, Any]

Examples

my-secret:
  vault.secrets.kv_v1.secret.present:
    - resource_id: secret/test # Can also be specified as "path"
    - data: '{"my-birthday": "2012-10-17"}'
async idem_vault.states.vault.secrets.kv_v1.secret.absent(hub, ctx, name: str, *, resource_id: (<class 'str'>, 'alias=path')) Dict[source]#

Deletes a secret stored with Vault KV_v1 secret engine.

Parameters:
  • name (str) – An Idem name of the resource.

  • resource_id (str) – The full logical path to write the data. This argument can also be specified using the alias “path.” This should be prefixed with ‘secret/’.

Request Syntax:
[vault-secret-name]:
  vault.secrets.kv_v1.secret.absent:
    - resource_id: 'string' # Can also be specified as "path"
Returns:

Dict[str, Any]

Examples

my-secret:
  vault.secrets.kv_v1.secret.absent:
    - resource_id: secret/test # an also be specified as "path"
async idem_vault.states.vault.secrets.kv_v1.secret.describe(hub, ctx)[source]#

Vault doesn’t allow enumeration of secrets