UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

143 lines 7.5 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.KubernetesCluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Import * * Before importing a Kubernetes cluster, the cluster's default node pool must be tagged with * * the `terraform:default-node-pool` tag. The provider will automatically add this tag if * * the cluster only has a single node pool. Clusters with more than one node pool, however, will require * * that you manually add the `terraform:default-node-pool` tag to the node pool that you intend to be * * the default node pool. * * Then the Kubernetes cluster and its default node pool can be imported using the cluster's `id`, e.g. * * ```sh * $ pulumi import digitalocean:index/kubernetesCluster:KubernetesCluster mycluster 1b8b2100-0e9f-4e8f-ad78-9eb578c2a0af * ``` * * Additional node pools must be imported separately as `digitalocean_kubernetes_cluster` * * resources, e.g. * * ```sh * $ pulumi import digitalocean:index/kubernetesCluster:KubernetesCluster mynodepool 9d76f410-9284-4436-9633-4066852442c8 * ``` */ class KubernetesCluster extends pulumi.CustomResource { /** * Get an existing KubernetesCluster 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 KubernetesCluster(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of KubernetesCluster. 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'] === KubernetesCluster.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["amdGpuDeviceMetricsExporterPlugin"] = state?.amdGpuDeviceMetricsExporterPlugin; resourceInputs["amdGpuDevicePlugin"] = state?.amdGpuDevicePlugin; resourceInputs["autoUpgrade"] = state?.autoUpgrade; resourceInputs["clusterAutoscalerConfigurations"] = state?.clusterAutoscalerConfigurations; resourceInputs["clusterSubnet"] = state?.clusterSubnet; resourceInputs["clusterUrn"] = state?.clusterUrn; resourceInputs["controlPlaneFirewall"] = state?.controlPlaneFirewall; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["destroyAllAssociatedResources"] = state?.destroyAllAssociatedResources; resourceInputs["endpoint"] = state?.endpoint; resourceInputs["ha"] = state?.ha; resourceInputs["ipv4Address"] = state?.ipv4Address; resourceInputs["kubeConfigs"] = state?.kubeConfigs; resourceInputs["kubeconfigExpireSeconds"] = state?.kubeconfigExpireSeconds; resourceInputs["maintenancePolicy"] = state?.maintenancePolicy; resourceInputs["name"] = state?.name; resourceInputs["nodePool"] = state?.nodePool; resourceInputs["nvidiaGpuDevicePlugin"] = state?.nvidiaGpuDevicePlugin; resourceInputs["rdmaSharedDevicePlugin"] = state?.rdmaSharedDevicePlugin; resourceInputs["region"] = state?.region; resourceInputs["registryIntegration"] = state?.registryIntegration; resourceInputs["routingAgent"] = state?.routingAgent; resourceInputs["serviceSubnet"] = state?.serviceSubnet; resourceInputs["status"] = state?.status; resourceInputs["surgeUpgrade"] = state?.surgeUpgrade; resourceInputs["tags"] = state?.tags; resourceInputs["updatedAt"] = state?.updatedAt; resourceInputs["version"] = state?.version; resourceInputs["vpcUuid"] = state?.vpcUuid; } else { const args = argsOrState; if (args?.nodePool === undefined && !opts.urn) { throw new Error("Missing required property 'nodePool'"); } if (args?.region === undefined && !opts.urn) { throw new Error("Missing required property 'region'"); } if (args?.version === undefined && !opts.urn) { throw new Error("Missing required property 'version'"); } resourceInputs["amdGpuDeviceMetricsExporterPlugin"] = args?.amdGpuDeviceMetricsExporterPlugin; resourceInputs["amdGpuDevicePlugin"] = args?.amdGpuDevicePlugin; resourceInputs["autoUpgrade"] = args?.autoUpgrade; resourceInputs["clusterAutoscalerConfigurations"] = args?.clusterAutoscalerConfigurations; resourceInputs["clusterSubnet"] = args?.clusterSubnet; resourceInputs["controlPlaneFirewall"] = args?.controlPlaneFirewall; resourceInputs["destroyAllAssociatedResources"] = args?.destroyAllAssociatedResources; resourceInputs["ha"] = args?.ha; resourceInputs["kubeconfigExpireSeconds"] = args?.kubeconfigExpireSeconds; resourceInputs["maintenancePolicy"] = args?.maintenancePolicy; resourceInputs["name"] = args?.name; resourceInputs["nodePool"] = args?.nodePool; resourceInputs["nvidiaGpuDevicePlugin"] = args?.nvidiaGpuDevicePlugin; resourceInputs["rdmaSharedDevicePlugin"] = args?.rdmaSharedDevicePlugin; resourceInputs["region"] = args?.region; resourceInputs["registryIntegration"] = args?.registryIntegration; resourceInputs["routingAgent"] = args?.routingAgent; resourceInputs["serviceSubnet"] = args?.serviceSubnet; resourceInputs["surgeUpgrade"] = args?.surgeUpgrade; resourceInputs["tags"] = args?.tags; resourceInputs["version"] = args?.version; resourceInputs["vpcUuid"] = args?.vpcUuid; resourceInputs["clusterUrn"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["endpoint"] = undefined /*out*/; resourceInputs["ipv4Address"] = undefined /*out*/; resourceInputs["kubeConfigs"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["kubeConfigs"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(KubernetesCluster.__pulumiType, name, resourceInputs, opts); } } exports.KubernetesCluster = KubernetesCluster; /** @internal */ KubernetesCluster.__pulumiType = 'digitalocean:index/kubernetesCluster:KubernetesCluster'; //# sourceMappingURL=kubernetesCluster.js.map