@pulumi/vault
Version:
A Pulumi package for creating and managing HashiCorp Vault cloud resources.
134 lines • 6.85 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.NomadSecretBackend = 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 config = new vault.NomadSecretBackend("config", {
* backend: "nomad",
* description: "test description",
* defaultLeaseTtlSeconds: 3600,
* maxLeaseTtlSeconds: 7200,
* maxTtl: 240,
* address: "https://127.0.0.1:4646",
* token: "ae20ceaa-...",
* ttl: 120,
* });
* ```
*
* ## Import
*
* Nomad secret backend can be imported using the `backend`, e.g.
*
* ```sh
* $ pulumi import vault:index/nomadSecretBackend:NomadSecretBackend nomad nomad
* ```
*/
class NomadSecretBackend extends pulumi.CustomResource {
/**
* Get an existing NomadSecretBackend 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 NomadSecretBackend(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of NomadSecretBackend. 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'] === NomadSecretBackend.__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["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["maxTokenNameLength"] = state?.maxTokenNameLength;
resourceInputs["maxTtl"] = state?.maxTtl;
resourceInputs["namespace"] = state?.namespace;
resourceInputs["options"] = state?.options;
resourceInputs["passthroughRequestHeaders"] = state?.passthroughRequestHeaders;
resourceInputs["pluginVersion"] = state?.pluginVersion;
resourceInputs["sealWrap"] = state?.sealWrap;
resourceInputs["token"] = state?.token;
resourceInputs["ttl"] = state?.ttl;
}
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["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["maxTokenNameLength"] = args?.maxTokenNameLength;
resourceInputs["maxTtl"] = args?.maxTtl;
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["ttl"] = args?.ttl;
resourceInputs["accessor"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["clientCert", "clientKey", "token"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(NomadSecretBackend.__pulumiType, name, resourceInputs, opts);
}
}
exports.NomadSecretBackend = NomadSecretBackend;
/** @internal */
NomadSecretBackend.__pulumiType = 'vault:index/nomadSecretBackend:NomadSecretBackend';
//# sourceMappingURL=nomadSecretBackend.js.map