Viewing docs for HashiCorp Vault v7.7.0
published on Friday, Feb 6, 2026 by Pulumi
published on Friday, Feb 6, 2026 by Pulumi
Viewing docs for HashiCorp Vault v7.7.0
published on Friday, Feb 6, 2026 by Pulumi
published on Friday, Feb 6, 2026 by Pulumi
Example Usage
Direct child namespaces
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const children = vault.getNamespaces({});
import pulumi
import pulumi_vault as vault
children = vault.get_namespaces()
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v7/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vault.GetNamespaces(ctx, &vault.GetNamespacesArgs{}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var children = Vault.GetNamespaces.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.VaultFunctions;
import com.pulumi.vault.inputs.GetNamespacesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var children = VaultFunctions.getNamespaces(GetNamespacesArgs.builder()
.build());
}
}
variables:
children:
fn::invoke:
function: vault:getNamespaces
arguments: {}
All child namespaces
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const children = vault.getNamespaces({
recursive: true,
});
import pulumi
import pulumi_vault as vault
children = vault.get_namespaces(recursive=True)
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v7/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vault.GetNamespaces(ctx, &vault.GetNamespacesArgs{
Recursive: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var children = Vault.GetNamespaces.Invoke(new()
{
Recursive = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.VaultFunctions;
import com.pulumi.vault.inputs.GetNamespacesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var children = VaultFunctions.getNamespaces(GetNamespacesArgs.builder()
.recursive(true)
.build());
}
}
variables:
children:
fn::invoke:
function: vault:getNamespaces
arguments:
recursive: true
Child namespace details
To fetch the details of child namespaces:
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const children = vault.getNamespaces({
namespace: "parent",
});
const child = .reduce((__obj, [__key, __value]) => ({ ...__obj, [__key]: vault.getNamespace({
namespace: _arg0_.namespace,
path: __key,
}) }));
import pulumi
import pulumi_vault as vault
children = vault.get_namespaces(namespace="parent")
child = {__key: vault.get_namespace(namespace=children.namespace,
path=__key) for __key, __value in children.paths}
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var children = Vault.GetNamespaces.Invoke(new()
{
Namespace = "parent",
});
var child = .ToDictionary(item => {
var __key = item.Key;
return __key;
}, item => {
var __key = item.Key;
return Vault.GetNamespace.Invoke(new()
{
Namespace = _arg0_.Namespace,
Path = __key,
});
});
});
Example coming soon!
Example coming soon!
Using getNamespaces
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getNamespaces(args: GetNamespacesArgs, opts?: InvokeOptions): Promise<GetNamespacesResult>
function getNamespacesOutput(args: GetNamespacesOutputArgs, opts?: InvokeOptions): Output<GetNamespacesResult>def get_namespaces(namespace: Optional[str] = None,
recursive: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetNamespacesResult
def get_namespaces_output(namespace: Optional[pulumi.Input[str]] = None,
recursive: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNamespacesResult]func GetNamespaces(ctx *Context, args *GetNamespacesArgs, opts ...InvokeOption) (*GetNamespacesResult, error)
func GetNamespacesOutput(ctx *Context, args *GetNamespacesOutputArgs, opts ...InvokeOption) GetNamespacesResultOutput> Note: This function is named GetNamespaces in the Go SDK.
public static class GetNamespaces
{
public static Task<GetNamespacesResult> InvokeAsync(GetNamespacesArgs args, InvokeOptions? opts = null)
public static Output<GetNamespacesResult> Invoke(GetNamespacesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNamespacesResult> getNamespaces(GetNamespacesArgs args, InvokeOptions options)
public static Output<GetNamespacesResult> getNamespaces(GetNamespacesArgs args, InvokeOptions options)
fn::invoke:
function: vault:index/getNamespaces:getNamespaces
arguments:
# arguments dictionaryThe following arguments are supported:
- Namespace string
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespaceis always relative to the provider's configured namespace. - Recursive bool
- If
true, it will returns all child namespaces of the given namespace. Defaults tofalse, which returns only direct child namespaces.
- Namespace string
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespaceis always relative to the provider's configured namespace. - Recursive bool
- If
true, it will returns all child namespaces of the given namespace. Defaults tofalse, which returns only direct child namespaces.
- namespace String
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespaceis always relative to the provider's configured namespace. - recursive Boolean
- If
true, it will returns all child namespaces of the given namespace. Defaults tofalse, which returns only direct child namespaces.
- namespace string
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespaceis always relative to the provider's configured namespace. - recursive boolean
- If
true, it will returns all child namespaces of the given namespace. Defaults tofalse, which returns only direct child namespaces.
- namespace str
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespaceis always relative to the provider's configured namespace. - recursive bool
- If
true, it will returns all child namespaces of the given namespace. Defaults tofalse, which returns only direct child namespaces.
- namespace String
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespaceis always relative to the provider's configured namespace. - recursive Boolean
- If
true, it will returns all child namespaces of the given namespace. Defaults tofalse, which returns only direct child namespaces.
getNamespaces Result
The following output properties are available:
Package Details
- Repository
- Vault pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vaultTerraform Provider.
Viewing docs for HashiCorp Vault v7.7.0
published on Friday, Feb 6, 2026 by Pulumi
published on Friday, Feb 6, 2026 by Pulumi
