key#

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

Creates or updates a secret key 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/’.

  • key (str) – Key of the secret

  • value (str, Optional) – Value of the secret

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

Dict[str, Any]

Examples

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

Deletes a secret key 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/’.

  • key (str) – Secret key to the deleted

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

Dict[str, Any]

Examples

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

Vault doesn’t allow enumeration of keys