Lists all keys under a particular mount.
resource "vault_mount" "pki" {
path = "pki"
type = "pki"
description = "PKI secret engine mount"
}
resource "vault_pki_secret_backend_root_cert" "root" {
backend = vault_mount.pki.path
type = "internal"
common_name = "example"
ttl = "86400"
key_name = "example"
}
data "vault_pki_secret_backend_keys" "example" {
backend = vault_pki_secret_backend_root_cert.root.backend
}
The following arguments are supported:
namespace
- (Optional) The namespace of the target resource.
The value should not contain leading or trailing forward slashes.
The namespace
is always relative to the provider's configured namespace.
Available only for Vault Enterprise.
backend
- (Required) The path to the PKI secret backend to
read the keys from, with no leading or trailing /
s.
In addition to the arguments above, the following attributes are exported:
keys
- Keys used under the backend path.
key_info
- Map of key strings read from Vault.
key_info_json
- JSON-encoded key data read from Vault.