@pulumi/vault
Version:
A Pulumi package for creating and managing HashiCorp Vault cloud resources.
86 lines • 2.49 kB
JavaScript
;
// *** 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
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
*
* const kvv1 = new vault.Mount("kvv1", {
* path: "kvv1",
* type: "kv",
* options: {
* version: "1",
* },
* description: "KV Version 1 secret engine mount",
* });
* const secret = new vault.kv.Secret("secret", {
* path: pulumi.interpolate`${kvv1.path}/secret`,
* dataJson: JSON.stringify({
* zip: "zap",
* foo: "bar",
* }),
* });
* const secretData = vault.kv.getSecretOutput({
* path: secret.path,
* });
* ```
*
* ## 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:kv/getSecret:getSecret", {
"namespace": args.namespace,
"path": args.path,
}, opts);
}
exports.getSecret = getSecret;
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
*
* const kvv1 = new vault.Mount("kvv1", {
* path: "kvv1",
* type: "kv",
* options: {
* version: "1",
* },
* description: "KV Version 1 secret engine mount",
* });
* const secret = new vault.kv.Secret("secret", {
* path: pulumi.interpolate`${kvv1.path}/secret`,
* dataJson: JSON.stringify({
* zip: "zap",
* foo: "bar",
* }),
* });
* const secretData = vault.kv.getSecretOutput({
* path: secret.path,
* });
* ```
*
* ## 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:kv/getSecret:getSecret", {
"namespace": args.namespace,
"path": args.path,
}, opts);
}
exports.getSecretOutput = getSecretOutput;
//# sourceMappingURL=getSecret.js.map