UNPKG

@pulumi/vault

Version:

A Pulumi package for creating and managing HashiCorp Vault cloud resources.

100 lines 2.9 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getSecretOutput = exports.getSecret = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ### Generic secret * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const rundeckAuth = vault.generic.getSecret({ * path: "secret/rundeck_auth", * }); * ``` * * ### KV * * For this example, consider `example` as a path for a KV engine. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * function notImplemented(message: string) { * throw new Error(message); * } * * const exampleCreds = vault.generic.getSecret({ * path: "example/creds", * }); * const exampleTemplate = notImplemented("The template_file data resource is not yet supported."); * ``` * * ## Required Vault Capabilities * * Use of this resource requires the `read` capability on the given path. */ function getSecret(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("vault:generic/getSecret:getSecret", { "namespace": args.namespace, "path": args.path, "version": args.version, "withLeaseStartTime": args.withLeaseStartTime, }, opts); } exports.getSecret = getSecret; /** * ## Example Usage * * ### Generic secret * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const rundeckAuth = vault.generic.getSecret({ * path: "secret/rundeck_auth", * }); * ``` * * ### KV * * For this example, consider `example` as a path for a KV engine. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * function notImplemented(message: string) { * throw new Error(message); * } * * const exampleCreds = vault.generic.getSecret({ * path: "example/creds", * }); * const exampleTemplate = notImplemented("The template_file data resource is not yet supported."); * ``` * * ## Required Vault Capabilities * * Use of this resource requires the `read` capability on the given path. */ function getSecretOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("vault:generic/getSecret:getSecret", { "namespace": args.namespace, "path": args.path, "version": args.version, "withLeaseStartTime": args.withLeaseStartTime, }, opts); } exports.getSecretOutput = getSecretOutput; //# sourceMappingURL=getSecret.js.map