UNPKG

@pulumi/vault

Version:

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

90 lines 3.45 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.PluginPinnedVersion = 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 jwt = new vault.Plugin("jwt", { * type: "auth", * name: "jwt", * command: "vault-plugin-auth-jwt", * version: "v0.17.0", * sha256: "6bd0a803ed742aa3ce35e4fa23d2c8d550e6c1567bf63410cec489c28b68b0fc", * envs: ["HTTP_PROXY=http://proxy.example.com:8080"], * }); * const jwtPin = new vault.PluginPinnedVersion("jwt_pin", { * type: jwt.type, * name: jwt.name, * version: jwt.version, * }); * const jwtAuth = new vault.AuthBackend("jwt_auth", {type: jwtPin.name}); * ``` * * ## Import * * Pinned plugin versions can be imported using `type/name` as the ID, e.g. * * ```sh * $ pulumi import vault:index/pluginPinnedVersion:PluginPinnedVersion jwt_pin auth/jwt * ``` */ class PluginPinnedVersion extends pulumi.CustomResource { /** * Get an existing PluginPinnedVersion 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 PluginPinnedVersion(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of PluginPinnedVersion. 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'] === PluginPinnedVersion.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["name"] = state?.name; resourceInputs["type"] = state?.type; resourceInputs["version"] = state?.version; } else { const args = argsOrState; if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } if (args?.version === undefined && !opts.urn) { throw new Error("Missing required property 'version'"); } resourceInputs["name"] = args?.name; resourceInputs["type"] = args?.type; resourceInputs["version"] = args?.version; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PluginPinnedVersion.__pulumiType, name, resourceInputs, opts); } } exports.PluginPinnedVersion = PluginPinnedVersion; /** @internal */ PluginPinnedVersion.__pulumiType = 'vault:index/pluginPinnedVersion:PluginPinnedVersion'; //# sourceMappingURL=pluginPinnedVersion.js.map