@pulumi/vault
Version:
A Pulumi package for creating and managing HashiCorp Vault cloud resources.
110 lines • 4.6 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.MfaPingid = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides a resource to manage [PingID MFA](https://www.vaultproject.io/docs/enterprise/mfa/mfa-pingid).
*
* **Note** this feature is available only with Vault Enterprise.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
*
* const config = new pulumi.Config();
* const settingsFile = config.requireObject<any>("settingsFile");
* const userpass = new vault.AuthBackend("userpass", {
* type: "userpass",
* path: "userpass",
* });
* const myPingid = new vault.MfaPingid("my_pingid", {
* name: "my_pingid",
* mountAccessor: userpass.accessor,
* usernameFormat: "user@example.com",
* settingsFileBase64: settingsFile,
* });
* ```
*
* ## Import
*
* Mounts can be imported using the `path`, e.g.
*
* ```sh
* $ pulumi import vault:index/mfaPingid:MfaPingid my_pingid my_pingid
* ```
*/
class MfaPingid extends pulumi.CustomResource {
/**
* Get an existing MfaPingid 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 MfaPingid(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of MfaPingid. 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'] === MfaPingid.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["adminUrl"] = state?.adminUrl;
resourceInputs["authenticatorUrl"] = state?.authenticatorUrl;
resourceInputs["idpUrl"] = state?.idpUrl;
resourceInputs["mountAccessor"] = state?.mountAccessor;
resourceInputs["name"] = state?.name;
resourceInputs["namespace"] = state?.namespace;
resourceInputs["namespaceId"] = state?.namespaceId;
resourceInputs["orgAlias"] = state?.orgAlias;
resourceInputs["settingsFileBase64"] = state?.settingsFileBase64;
resourceInputs["type"] = state?.type;
resourceInputs["useSignature"] = state?.useSignature;
resourceInputs["usernameFormat"] = state?.usernameFormat;
}
else {
const args = argsOrState;
if (args?.mountAccessor === undefined && !opts.urn) {
throw new Error("Missing required property 'mountAccessor'");
}
if (args?.settingsFileBase64 === undefined && !opts.urn) {
throw new Error("Missing required property 'settingsFileBase64'");
}
resourceInputs["mountAccessor"] = args?.mountAccessor;
resourceInputs["name"] = args?.name;
resourceInputs["namespace"] = args?.namespace;
resourceInputs["settingsFileBase64"] = args?.settingsFileBase64;
resourceInputs["usernameFormat"] = args?.usernameFormat;
resourceInputs["adminUrl"] = undefined /*out*/;
resourceInputs["authenticatorUrl"] = undefined /*out*/;
resourceInputs["idpUrl"] = undefined /*out*/;
resourceInputs["namespaceId"] = undefined /*out*/;
resourceInputs["orgAlias"] = undefined /*out*/;
resourceInputs["type"] = undefined /*out*/;
resourceInputs["useSignature"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(MfaPingid.__pulumiType, name, resourceInputs, opts);
}
}
exports.MfaPingid = MfaPingid;
/** @internal */
MfaPingid.__pulumiType = 'vault:index/mfaPingid:MfaPingid';
//# sourceMappingURL=mfaPingid.js.map