// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; export class K8sCluster extends pulumi.CustomResource { /** * Get an existing K8sCluster 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. */ public static get(name: string, id: pulumi.Input, state?: K8sClusterState, opts?: pulumi.CustomResourceOptions): K8sCluster { return new K8sCluster(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'timeweb-cloud:index/k8sCluster:K8sCluster'; /** * Returns true if the given object is an instance of K8sCluster. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is K8sCluster { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === K8sCluster.__pulumiType; } /** * Sum of CPU count of all worker nodes */ declare public /*out*/ readonly cpu: pulumi.Output; /** * Description for K8S cluster */ declare public readonly description: pulumi.Output; /** * Sum of disks volume of worker nodes */ declare public /*out*/ readonly disk: pulumi.Output; /** * High Availability for K8S cluster */ declare public readonly highAvailability: pulumi.Output; /** * Add ingress for K8S cluster */ declare public readonly ingress: pulumi.Output; declare public readonly k8sClusterId: pulumi.Output; /** * K8S cluster kubeconfig */ declare public /*out*/ readonly kubeconfig: pulumi.Output; /** * Name for K8S cluster */ declare public readonly name: pulumi.Output; /** * Network driver for K8S cluster [may be retrieved from API](https://api.timeweb.cloud/api/v1/k8s/network_drivers) */ declare public readonly networkDriver: pulumi.Output; /** * ID of VPC for K8S cluster */ declare public readonly networkId: pulumi.Output; /** * Preset ID for K8S cluster */ declare public readonly presetId: pulumi.Output; /** * Project ID for K8S cluster */ declare public readonly projectId: pulumi.Output; /** * Sum of RAM count of all worker nodes */ declare public /*out*/ readonly ram: pulumi.Output; /** * Current status of K8S cluster (`installing`, `provisioning`, `active`, `unpaid`, `started`, `not_installed`, `failed`, * `unpaid_not_installed`, `deletion`) */ declare public /*out*/ readonly status: pulumi.Output; /** * K8S version [may be retrieved from API](https://api.timeweb.cloud/api/v1/k8s/k8s_versions) */ declare public readonly version: pulumi.Output; /** * Create a K8sCluster resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: K8sClusterArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: K8sClusterArgs | K8sClusterState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as K8sClusterState | undefined; resourceInputs["cpu"] = state?.cpu; resourceInputs["description"] = state?.description; resourceInputs["disk"] = state?.disk; resourceInputs["highAvailability"] = state?.highAvailability; resourceInputs["ingress"] = state?.ingress; resourceInputs["k8sClusterId"] = state?.k8sClusterId; resourceInputs["kubeconfig"] = state?.kubeconfig; resourceInputs["name"] = state?.name; resourceInputs["networkDriver"] = state?.networkDriver; resourceInputs["networkId"] = state?.networkId; resourceInputs["presetId"] = state?.presetId; resourceInputs["projectId"] = state?.projectId; resourceInputs["ram"] = state?.ram; resourceInputs["status"] = state?.status; resourceInputs["version"] = state?.version; } else { const args = argsOrState as K8sClusterArgs | undefined; if (args?.networkDriver === undefined && !opts.urn) { throw new Error("Missing required property 'networkDriver'"); } if (args?.presetId === undefined && !opts.urn) { throw new Error("Missing required property 'presetId'"); } if (args?.version === undefined && !opts.urn) { throw new Error("Missing required property 'version'"); } resourceInputs["description"] = args?.description; resourceInputs["highAvailability"] = args?.highAvailability; resourceInputs["ingress"] = args?.ingress; resourceInputs["k8sClusterId"] = args?.k8sClusterId; resourceInputs["name"] = args?.name; resourceInputs["networkDriver"] = args?.networkDriver; resourceInputs["networkId"] = args?.networkId; resourceInputs["presetId"] = args?.presetId; resourceInputs["projectId"] = args?.projectId; resourceInputs["version"] = args?.version; resourceInputs["cpu"] = undefined /*out*/; resourceInputs["disk"] = undefined /*out*/; resourceInputs["kubeconfig"] = undefined /*out*/; resourceInputs["ram"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["kubeconfig"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(K8sCluster.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage()); } } /** * Input properties used for looking up and filtering K8sCluster resources. */ export interface K8sClusterState { /** * Sum of CPU count of all worker nodes */ cpu?: pulumi.Input; /** * Description for K8S cluster */ description?: pulumi.Input; /** * Sum of disks volume of worker nodes */ disk?: pulumi.Input; /** * High Availability for K8S cluster */ highAvailability?: pulumi.Input; /** * Add ingress for K8S cluster */ ingress?: pulumi.Input; k8sClusterId?: pulumi.Input; /** * K8S cluster kubeconfig */ kubeconfig?: pulumi.Input; /** * Name for K8S cluster */ name?: pulumi.Input; /** * Network driver for K8S cluster [may be retrieved from API](https://api.timeweb.cloud/api/v1/k8s/network_drivers) */ networkDriver?: pulumi.Input; /** * ID of VPC for K8S cluster */ networkId?: pulumi.Input; /** * Preset ID for K8S cluster */ presetId?: pulumi.Input; /** * Project ID for K8S cluster */ projectId?: pulumi.Input; /** * Sum of RAM count of all worker nodes */ ram?: pulumi.Input; /** * Current status of K8S cluster (`installing`, `provisioning`, `active`, `unpaid`, `started`, `not_installed`, `failed`, * `unpaid_not_installed`, `deletion`) */ status?: pulumi.Input; /** * K8S version [may be retrieved from API](https://api.timeweb.cloud/api/v1/k8s/k8s_versions) */ version?: pulumi.Input; } /** * The set of arguments for constructing a K8sCluster resource. */ export interface K8sClusterArgs { /** * Description for K8S cluster */ description?: pulumi.Input; /** * High Availability for K8S cluster */ highAvailability?: pulumi.Input; /** * Add ingress for K8S cluster */ ingress?: pulumi.Input; k8sClusterId?: pulumi.Input; /** * Name for K8S cluster */ name?: pulumi.Input; /** * Network driver for K8S cluster [may be retrieved from API](https://api.timeweb.cloud/api/v1/k8s/network_drivers) */ networkDriver: pulumi.Input; /** * ID of VPC for K8S cluster */ networkId?: pulumi.Input; /** * Preset ID for K8S cluster */ presetId: pulumi.Input; /** * Project ID for K8S cluster */ projectId?: pulumi.Input; /** * K8S version [may be retrieved from API](https://api.timeweb.cloud/api/v1/k8s/k8s_versions) */ version: pulumi.Input; }