UNPKG

@pulumi/vault

Version:

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

119 lines 6 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 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const test = new vault.terraformcloud.SecretBackend("test", { * backend: "terraform", * description: "Manages the Terraform Cloud backend", * token: "V0idfhi2iksSDU234ucdbi2nidsi...", * }); * ``` * * ## Import * * Terraform Cloud secret backends can be imported using the `backend`, e.g. * * ```sh * $ pulumi import vault:terraformcloud/secretBackend:SecretBackend example terraform * ``` */ 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["backend"] = state?.backend; resourceInputs["basePath"] = state?.basePath; 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["pluginVersion"] = state?.pluginVersion; resourceInputs["sealWrap"] = state?.sealWrap; resourceInputs["token"] = state?.token; } else { const args = argsOrState; resourceInputs["address"] = args?.address; resourceInputs["allowedManagedKeys"] = args?.allowedManagedKeys; resourceInputs["allowedResponseHeaders"] = args?.allowedResponseHeaders; resourceInputs["auditNonHmacRequestKeys"] = args?.auditNonHmacRequestKeys; resourceInputs["auditNonHmacResponseKeys"] = args?.auditNonHmacResponseKeys; resourceInputs["backend"] = args?.backend; resourceInputs["basePath"] = args?.basePath; 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["pluginVersion"] = args?.pluginVersion; 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: ["token"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(SecretBackend.__pulumiType, name, resourceInputs, opts); } } exports.SecretBackend = SecretBackend; /** @internal */ SecretBackend.__pulumiType = 'vault:terraformcloud/secretBackend:SecretBackend'; //# sourceMappingURL=secretBackend.js.map