@pulumi/vault
Version:
A Pulumi package for creating and managing HashiCorp Vault cloud resources.
168 lines (167 loc) • 5.13 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
*
* const kvv2 = new vault.Mount("kvv2", {
* path: "kvv2",
* type: "kv",
* options: {
* version: "2",
* },
* description: "KV Version 2 secret engine mount",
* });
* const awsSecret = new vault.kv.SecretV2("aws_secret", {
* mount: kvv2.path,
* name: "aws_secret",
* dataJson: JSON.stringify({
* zip: "zap",
* foo: "bar",
* }),
* });
* const test = vault.kv.getSecretSubkeysV2Output({
* mount: kvv2.path,
* name: awsSecret.name,
* });
* ```
*
* ## Required Vault Capabilities
*
* Use of this resource requires the `read` capability on the given path.
*/
export declare function getSecretSubkeysV2(args: GetSecretSubkeysV2Args, opts?: pulumi.InvokeOptions): Promise<GetSecretSubkeysV2Result>;
/**
* A collection of arguments for invoking getSecretSubkeysV2.
*/
export interface GetSecretSubkeysV2Args {
/**
* Specifies the deepest nesting level to provide in the output.
* If non-zero, keys that reside at the specified depth value will be
* artificially treated as leaves and will thus be `null` even if further
* underlying sub-keys exist.
*/
depth?: number;
/**
* Path where KV-V2 engine is mounted.
*/
mount: string;
/**
* Full name of the secret. For a nested secret
* the name is the nested path excluding the mount and data
* prefix. For example, for a secret at `kvv2/data/foo/bar/baz`
* the name is `foo/bar/baz`.
*/
name: string;
/**
* 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](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
*/
namespace?: string;
/**
* Specifies the version to return. If not
* set the latest version is returned.
*/
version?: number;
}
/**
* A collection of values returned by getSecretSubkeysV2.
*/
export interface GetSecretSubkeysV2Result {
/**
* Subkeys for the KV-V2 secret stored as a serialized map of strings.
*/
readonly data: {
[key: string]: string;
};
/**
* Subkeys for the KV-V2 secret read from Vault.
*/
readonly dataJson: string;
readonly depth?: number;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly mount: string;
readonly name: string;
readonly namespace?: string;
/**
* Full path where the KV-V2 secrets are listed.
*/
readonly path: string;
readonly version?: number;
}
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
*
* const kvv2 = new vault.Mount("kvv2", {
* path: "kvv2",
* type: "kv",
* options: {
* version: "2",
* },
* description: "KV Version 2 secret engine mount",
* });
* const awsSecret = new vault.kv.SecretV2("aws_secret", {
* mount: kvv2.path,
* name: "aws_secret",
* dataJson: JSON.stringify({
* zip: "zap",
* foo: "bar",
* }),
* });
* const test = vault.kv.getSecretSubkeysV2Output({
* mount: kvv2.path,
* name: awsSecret.name,
* });
* ```
*
* ## Required Vault Capabilities
*
* Use of this resource requires the `read` capability on the given path.
*/
export declare function getSecretSubkeysV2Output(args: GetSecretSubkeysV2OutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSecretSubkeysV2Result>;
/**
* A collection of arguments for invoking getSecretSubkeysV2.
*/
export interface GetSecretSubkeysV2OutputArgs {
/**
* Specifies the deepest nesting level to provide in the output.
* If non-zero, keys that reside at the specified depth value will be
* artificially treated as leaves and will thus be `null` even if further
* underlying sub-keys exist.
*/
depth?: pulumi.Input<number>;
/**
* Path where KV-V2 engine is mounted.
*/
mount: pulumi.Input<string>;
/**
* Full name of the secret. For a nested secret
* the name is the nested path excluding the mount and data
* prefix. For example, for a secret at `kvv2/data/foo/bar/baz`
* the name is `foo/bar/baz`.
*/
name: pulumi.Input<string>;
/**
* 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](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
*/
namespace?: pulumi.Input<string>;
/**
* Specifies the version to return. If not
* set the latest version is returned.
*/
version?: pulumi.Input<number>;
}