UNPKG

@komminarlabs/cratedb

Version:

A Pulumi package for creating and managing CrateDB resources.

128 lines 7.34 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Cluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Creates and manages a cluster. */ class Cluster extends pulumi.CustomResource { /** * Get an existing Cluster 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 Cluster(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Cluster. 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'] === Cluster.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allowCustomStorage"] = state ? state.allowCustomStorage : undefined; resourceInputs["allowSuspend"] = state ? state.allowSuspend : undefined; resourceInputs["backupSchedule"] = state ? state.backupSchedule : undefined; resourceInputs["channel"] = state ? state.channel : undefined; resourceInputs["crateVersion"] = state ? state.crateVersion : undefined; resourceInputs["dc"] = state ? state.dc : undefined; resourceInputs["deletionProtected"] = state ? state.deletionProtected : undefined; resourceInputs["externalIp"] = state ? state.externalIp : undefined; resourceInputs["fqdn"] = state ? state.fqdn : undefined; resourceInputs["gcAvailable"] = state ? state.gcAvailable : undefined; resourceInputs["hardwareSpecs"] = state ? state.hardwareSpecs : undefined; resourceInputs["health"] = state ? state.health : undefined; resourceInputs["ipWhitelists"] = state ? state.ipWhitelists : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["numNodes"] = state ? state.numNodes : undefined; resourceInputs["organizationId"] = state ? state.organizationId : undefined; resourceInputs["origin"] = state ? state.origin : undefined; resourceInputs["password"] = state ? state.password : undefined; resourceInputs["productName"] = state ? state.productName : undefined; resourceInputs["productTier"] = state ? state.productTier : undefined; resourceInputs["productUnit"] = state ? state.productUnit : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["subscriptionId"] = state ? state.subscriptionId : undefined; resourceInputs["suspended"] = state ? state.suspended : undefined; resourceInputs["url"] = state ? state.url : undefined; resourceInputs["username"] = state ? state.username : undefined; } else { const args = argsOrState; if ((!args || args.crateVersion === undefined) && !opts.urn) { throw new Error("Missing required property 'crateVersion'"); } if ((!args || args.organizationId === undefined) && !opts.urn) { throw new Error("Missing required property 'organizationId'"); } if ((!args || args.password === undefined) && !opts.urn) { throw new Error("Missing required property 'password'"); } if ((!args || args.productName === undefined) && !opts.urn) { throw new Error("Missing required property 'productName'"); } if ((!args || args.productTier === undefined) && !opts.urn) { throw new Error("Missing required property 'productTier'"); } if ((!args || args.projectId === undefined) && !opts.urn) { throw new Error("Missing required property 'projectId'"); } if ((!args || args.subscriptionId === undefined) && !opts.urn) { throw new Error("Missing required property 'subscriptionId'"); } if ((!args || args.username === undefined) && !opts.urn) { throw new Error("Missing required property 'username'"); } resourceInputs["channel"] = args ? args.channel : undefined; resourceInputs["crateVersion"] = args ? args.crateVersion : undefined; resourceInputs["hardwareSpecs"] = args ? args.hardwareSpecs : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["organizationId"] = args ? args.organizationId : undefined; resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined; resourceInputs["productName"] = args ? args.productName : undefined; resourceInputs["productTier"] = args ? args.productTier : undefined; resourceInputs["productUnit"] = args ? args.productUnit : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["subscriptionId"] = args ? args.subscriptionId : undefined; resourceInputs["username"] = args ? args.username : undefined; resourceInputs["allowCustomStorage"] = undefined /*out*/; resourceInputs["allowSuspend"] = undefined /*out*/; resourceInputs["backupSchedule"] = undefined /*out*/; resourceInputs["dc"] = undefined /*out*/; resourceInputs["deletionProtected"] = undefined /*out*/; resourceInputs["externalIp"] = undefined /*out*/; resourceInputs["fqdn"] = undefined /*out*/; resourceInputs["gcAvailable"] = undefined /*out*/; resourceInputs["health"] = undefined /*out*/; resourceInputs["ipWhitelists"] = undefined /*out*/; resourceInputs["numNodes"] = undefined /*out*/; resourceInputs["origin"] = undefined /*out*/; resourceInputs["suspended"] = undefined /*out*/; resourceInputs["url"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["password"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Cluster.__pulumiType, name, resourceInputs, opts); } } exports.Cluster = Cluster; /** @internal */ Cluster.__pulumiType = 'cratedb:index/cluster:Cluster'; //# sourceMappingURL=cluster.js.map