UNPKG

@pulumi/vault

Version:

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

145 lines 7.13 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.SecretBackend = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ### Creating a standard backend resource: * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const test = new vault.consul.SecretBackend("test", { * path: "consul", * description: "Manages the Consul backend", * address: "127.0.0.1:8500", * token: "4240861b-ce3d-8530-115a-521ff070dd29", * }); * ``` * * ### Creating a backend resource to bootstrap a new Consul instance: * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const test = new vault.consul.SecretBackend("test", { * path: "consul", * description: "Bootstrap the Consul backend", * address: "127.0.0.1:8500", * bootstrap: true, * }); * ``` * * ## Import * * Consul secret backends can be imported using the `path`, e.g. * * ```sh * $ pulumi import vault:consul/secretBackend:SecretBackend example consul * ``` */ class SecretBackend extends pulumi.CustomResource { /** * Get an existing SecretBackend resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new SecretBackend(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of SecretBackend. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === SecretBackend.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessor"] = state?.accessor; resourceInputs["address"] = state?.address; resourceInputs["allowedManagedKeys"] = state?.allowedManagedKeys; resourceInputs["allowedResponseHeaders"] = state?.allowedResponseHeaders; resourceInputs["auditNonHmacRequestKeys"] = state?.auditNonHmacRequestKeys; resourceInputs["auditNonHmacResponseKeys"] = state?.auditNonHmacResponseKeys; resourceInputs["bootstrap"] = state?.bootstrap; resourceInputs["caCert"] = state?.caCert; resourceInputs["clientCert"] = state?.clientCert; resourceInputs["clientKey"] = state?.clientKey; resourceInputs["defaultLeaseTtlSeconds"] = state?.defaultLeaseTtlSeconds; resourceInputs["delegatedAuthAccessors"] = state?.delegatedAuthAccessors; resourceInputs["description"] = state?.description; resourceInputs["disableRemount"] = state?.disableRemount; resourceInputs["externalEntropyAccess"] = state?.externalEntropyAccess; resourceInputs["forceNoCache"] = state?.forceNoCache; resourceInputs["identityTokenKey"] = state?.identityTokenKey; resourceInputs["listingVisibility"] = state?.listingVisibility; resourceInputs["local"] = state?.local; resourceInputs["maxLeaseTtlSeconds"] = state?.maxLeaseTtlSeconds; resourceInputs["namespace"] = state?.namespace; resourceInputs["options"] = state?.options; resourceInputs["passthroughRequestHeaders"] = state?.passthroughRequestHeaders; resourceInputs["path"] = state?.path; resourceInputs["pluginVersion"] = state?.pluginVersion; resourceInputs["scheme"] = state?.scheme; resourceInputs["sealWrap"] = state?.sealWrap; resourceInputs["token"] = state?.token; } else { const args = argsOrState; if (args?.address === undefined && !opts.urn) { throw new Error("Missing required property 'address'"); } resourceInputs["address"] = args?.address; resourceInputs["allowedManagedKeys"] = args?.allowedManagedKeys; resourceInputs["allowedResponseHeaders"] = args?.allowedResponseHeaders; resourceInputs["auditNonHmacRequestKeys"] = args?.auditNonHmacRequestKeys; resourceInputs["auditNonHmacResponseKeys"] = args?.auditNonHmacResponseKeys; resourceInputs["bootstrap"] = args?.bootstrap; resourceInputs["caCert"] = args?.caCert; resourceInputs["clientCert"] = args?.clientCert ? pulumi.secret(args.clientCert) : undefined; resourceInputs["clientKey"] = args?.clientKey ? pulumi.secret(args.clientKey) : undefined; resourceInputs["defaultLeaseTtlSeconds"] = args?.defaultLeaseTtlSeconds; resourceInputs["delegatedAuthAccessors"] = args?.delegatedAuthAccessors; resourceInputs["description"] = args?.description; resourceInputs["disableRemount"] = args?.disableRemount; resourceInputs["externalEntropyAccess"] = args?.externalEntropyAccess; resourceInputs["forceNoCache"] = args?.forceNoCache; resourceInputs["identityTokenKey"] = args?.identityTokenKey; resourceInputs["listingVisibility"] = args?.listingVisibility; resourceInputs["local"] = args?.local; resourceInputs["maxLeaseTtlSeconds"] = args?.maxLeaseTtlSeconds; resourceInputs["namespace"] = args?.namespace; resourceInputs["options"] = args?.options; resourceInputs["passthroughRequestHeaders"] = args?.passthroughRequestHeaders; resourceInputs["path"] = args?.path; resourceInputs["pluginVersion"] = args?.pluginVersion; resourceInputs["scheme"] = args?.scheme; resourceInputs["sealWrap"] = args?.sealWrap; resourceInputs["token"] = args?.token ? pulumi.secret(args.token) : undefined; resourceInputs["accessor"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["clientCert", "clientKey", "token"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(SecretBackend.__pulumiType, name, resourceInputs, opts); } } exports.SecretBackend = SecretBackend; /** @internal */ SecretBackend.__pulumiType = 'vault:consul/secretBackend:SecretBackend'; //# sourceMappingURL=secretBackend.js.map