@pulumi/vault
Version:
A Pulumi package for creating and managing HashiCorp Vault cloud resources.
96 lines • 2.78 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.getSecretV2Output = exports.getSecretV2 = 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 kvv2 = new vault.Mount("kvv2", {
* path: "kvv2",
* type: "kv",
* options: {
* version: "2",
* },
* description: "KV Version 2 secret engine mount",
* });
* const exampleSecretV2 = new vault.kv.SecretV2("example", {
* mount: kvv2.path,
* name: "secret",
* deleteAllVersions: true,
* dataJson: JSON.stringify({
* zip: "zap",
* foo: "bar",
* }),
* });
* const example = vault.kv.getSecretV2Output({
* mount: kvv2.path,
* name: exampleSecretV2.name,
* });
* ```
*
* ## Required Vault Capabilities
*
* Use of this resource requires the `read` capability on the given path.
*/
function getSecretV2(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("vault:kv/getSecretV2:getSecretV2", {
"mount": args.mount,
"name": args.name,
"namespace": args.namespace,
"version": args.version,
}, opts);
}
exports.getSecretV2 = getSecretV2;
/**
* ## 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 exampleSecretV2 = new vault.kv.SecretV2("example", {
* mount: kvv2.path,
* name: "secret",
* deleteAllVersions: true,
* dataJson: JSON.stringify({
* zip: "zap",
* foo: "bar",
* }),
* });
* const example = vault.kv.getSecretV2Output({
* mount: kvv2.path,
* name: exampleSecretV2.name,
* });
* ```
*
* ## Required Vault Capabilities
*
* Use of this resource requires the `read` capability on the given path.
*/
function getSecretV2Output(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("vault:kv/getSecretV2:getSecretV2", {
"mount": args.mount,
"name": args.name,
"namespace": args.namespace,
"version": args.version,
}, opts);
}
exports.getSecretV2Output = getSecretV2Output;
//# sourceMappingURL=getSecretV2.js.map