vault_kv_subkeys_v2

Reads the subkeys for a KV-V2 secret written to Vault.

For more information on Vault's KV-V2 secret backend see here.

Example Usage

resource "vault_mount" "kvv2" {
  path        = "kvv2"
  type        = "kv"
  options     = { version = "2" }
  description = "KV Version 2 secret engine mount"
}

resource "vault_kv_secret_v2" "aws_secret" {
 mount = vault_mount.kvv2.path
 name  = "aws_secret"
 data_json = jsonencode(
 {
  zip = "zap", 
  foo = "bar"

 }
 )
}

data "vault_kv_secret_subkeys_v2" "test" {
  mount = vault_mount.kvv2.path
  name  = vault_kv_secret_v2.aws_secret.name
}

Argument Reference

The following arguments are supported:

Required Vault Capabilities

Use of this resource requires the read capability on the given path.

Attributes Reference

The following attributes are exported: