vault_namespace

Lookup a Namespace from Vault or from the provider configuration.

Note this feature is available only with Vault Enterprise.

Example Usage

Current namespace

data "vault_namespace" "current" {}

Single namespace

data "vault_namespace" "ns1" {
  path = "ns1"
}

Nested namespace

provider "vault" {
  namespace = "foo"
}

data "vault_namespace" "child" {
  namespace = "parent"
  path      = "child"
}

locals {
  full_path = data.vault_namespace.child.id      # -> foo/parent/child/
  path_fq   = data.vault_namespace.child.path_fq # -> parent/child
}

Argument Reference

The following arguments are supported:

Attributes Reference

In addition to the above arguments, the following attributes are exported: