UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

94 lines 4.62 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.LkeCluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Import * * LKE Clusters can be imported using the `id`, e.g. * * ```sh * $ pulumi import linode:index/lkeCluster:LkeCluster my_cluster 12345 * ``` */ class LkeCluster extends pulumi.CustomResource { /** * Get an existing LkeCluster 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 LkeCluster(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of LkeCluster. 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'] === LkeCluster.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["apiEndpoints"] = state ? state.apiEndpoints : undefined; resourceInputs["controlPlane"] = state ? state.controlPlane : undefined; resourceInputs["dashboardUrl"] = state ? state.dashboardUrl : undefined; resourceInputs["externalPoolTags"] = state ? state.externalPoolTags : undefined; resourceInputs["k8sVersion"] = state ? state.k8sVersion : undefined; resourceInputs["kubeconfig"] = state ? state.kubeconfig : undefined; resourceInputs["label"] = state ? state.label : undefined; resourceInputs["pools"] = state ? state.pools : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tier"] = state ? state.tier : undefined; } else { const args = argsOrState; if ((!args || args.k8sVersion === undefined) && !opts.urn) { throw new Error("Missing required property 'k8sVersion'"); } if ((!args || args.label === undefined) && !opts.urn) { throw new Error("Missing required property 'label'"); } if ((!args || args.pools === undefined) && !opts.urn) { throw new Error("Missing required property 'pools'"); } if ((!args || args.region === undefined) && !opts.urn) { throw new Error("Missing required property 'region'"); } resourceInputs["controlPlane"] = args ? args.controlPlane : undefined; resourceInputs["externalPoolTags"] = args ? args.externalPoolTags : undefined; resourceInputs["k8sVersion"] = args ? args.k8sVersion : undefined; resourceInputs["label"] = args ? args.label : undefined; resourceInputs["pools"] = args ? args.pools : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["tier"] = args ? args.tier : undefined; resourceInputs["apiEndpoints"] = undefined /*out*/; resourceInputs["dashboardUrl"] = undefined /*out*/; resourceInputs["kubeconfig"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["kubeconfig"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(LkeCluster.__pulumiType, name, resourceInputs, opts); } } exports.LkeCluster = LkeCluster; /** @internal */ LkeCluster.__pulumiType = 'linode:index/lkeCluster:LkeCluster'; //# sourceMappingURL=lkeCluster.js.map