UNPKG

@pierskarsenbarg/sdm

Version:

A Pulumi package for creating and managing StrongDM cloud resources.

78 lines 3.19 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.ProxyClusterKey = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Proxy Cluster Keys are authentication keys for all proxies within a cluster. * The proxies within a cluster share the same key. One cluster can have * multiple keys in order to facilitate key rotation. * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sdm from "@pierskarsenbarg/sdm"; * * const testProxyClusterKey = new sdm.ProxyClusterKey("testProxyClusterKey", {proxyClusterId: "n-12345123"}); * ``` * This resource can be imported using the import command. * * ## Import * * A ProxyClusterKey can be imported using the id, e.g., * * ```sh * $ pulumi import sdm:index/proxyClusterKey:ProxyClusterKey example gk-12345678 * ``` */ class ProxyClusterKey extends pulumi.CustomResource { /** * Get an existing ProxyClusterKey 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 ProxyClusterKey(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ProxyClusterKey. 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'] === ProxyClusterKey.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["proxyClusterId"] = state?.proxyClusterId; resourceInputs["secretKey"] = state?.secretKey; } else { const args = argsOrState; if (args?.proxyClusterId === undefined && !opts.urn) { throw new Error("Missing required property 'proxyClusterId'"); } resourceInputs["proxyClusterId"] = args?.proxyClusterId; resourceInputs["secretKey"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["secretKey"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(ProxyClusterKey.__pulumiType, name, resourceInputs, opts); } } exports.ProxyClusterKey = ProxyClusterKey; /** @internal */ ProxyClusterKey.__pulumiType = 'sdm:index/proxyClusterKey:ProxyClusterKey'; //# sourceMappingURL=proxyClusterKey.js.map