@pulumi/vault
Version:
A Pulumi package for creating and managing HashiCorp Vault cloud resources.
93 lines • 4.04 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.RaftAutopilot = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Autopilot enables automated workflows for managing Raft clusters. The
* current feature set includes 3 main features: Server Stabilization, Dead
* Server Cleanup and State API. **These three features are introduced in
* Vault 1.7.**
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
*
* const autopilot = new vault.RaftAutopilot("autopilot", {
* cleanupDeadServers: true,
* deadServerLastContactThreshold: "24h0m0s",
* lastContactThreshold: "10s",
* maxTrailingLogs: 1000,
* minQuorum: 3,
* serverStabilizationTime: "10s",
* });
* ```
*
* ## Import
*
* Raft Autopilot config can be imported using the ID, e.g.
*
* ```sh
* $ pulumi import vault:index/raftAutopilot:RaftAutopilot autopilot sys/storage/raft/autopilot/configuration
* ```
*/
class RaftAutopilot extends pulumi.CustomResource {
/**
* Get an existing RaftAutopilot 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 RaftAutopilot(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of RaftAutopilot. 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'] === RaftAutopilot.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["cleanupDeadServers"] = state?.cleanupDeadServers;
resourceInputs["deadServerLastContactThreshold"] = state?.deadServerLastContactThreshold;
resourceInputs["disableUpgradeMigration"] = state?.disableUpgradeMigration;
resourceInputs["lastContactThreshold"] = state?.lastContactThreshold;
resourceInputs["maxTrailingLogs"] = state?.maxTrailingLogs;
resourceInputs["minQuorum"] = state?.minQuorum;
resourceInputs["namespace"] = state?.namespace;
resourceInputs["serverStabilizationTime"] = state?.serverStabilizationTime;
}
else {
const args = argsOrState;
resourceInputs["cleanupDeadServers"] = args?.cleanupDeadServers;
resourceInputs["deadServerLastContactThreshold"] = args?.deadServerLastContactThreshold;
resourceInputs["disableUpgradeMigration"] = args?.disableUpgradeMigration;
resourceInputs["lastContactThreshold"] = args?.lastContactThreshold;
resourceInputs["maxTrailingLogs"] = args?.maxTrailingLogs;
resourceInputs["minQuorum"] = args?.minQuorum;
resourceInputs["namespace"] = args?.namespace;
resourceInputs["serverStabilizationTime"] = args?.serverStabilizationTime;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(RaftAutopilot.__pulumiType, name, resourceInputs, opts);
}
}
exports.RaftAutopilot = RaftAutopilot;
/** @internal */
RaftAutopilot.__pulumiType = 'vault:index/raftAutopilot:RaftAutopilot';
//# sourceMappingURL=raftAutopilot.js.map