@pulumi/digitalocean
Version:
A Pulumi package for creating and managing DigitalOcean cloud resources.
378 lines (377 loc) • 19.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
import * as enums from "./types/enums";
/**
* ## 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
* ```
*/
export declare 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: string, id: pulumi.Input<pulumi.ID>, state?: KubernetesClusterState, opts?: pulumi.CustomResourceOptions): KubernetesCluster;
/**
* 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: any): obj is KubernetesCluster;
/**
* Block containing options for the AMD GPU device metrics exporter component.
*/
readonly amdGpuDeviceMetricsExporterPlugin: pulumi.Output<outputs.KubernetesClusterAmdGpuDeviceMetricsExporterPlugin>;
/**
* Block containing options for the AMD GPU device plugin component. If not specified, the component will be enabled by default for clusters with AMD GPU nodes.
*/
readonly amdGpuDevicePlugin: pulumi.Output<outputs.KubernetesClusterAmdGpuDevicePlugin>;
/**
* A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.
*/
readonly autoUpgrade: pulumi.Output<boolean | undefined>;
/**
* Block containing options for cluster auto-scaling.
*/
readonly clusterAutoscalerConfigurations: pulumi.Output<outputs.KubernetesClusterClusterAutoscalerConfiguration[] | undefined>;
/**
* The range of IP addresses in the overlay network of the Kubernetes cluster. For more information, see [here](https://docs.digitalocean.com/products/kubernetes/how-to/create-clusters/#create-with-vpc-native).
*/
readonly clusterSubnet: pulumi.Output<string>;
/**
* The uniform resource name (URN) for the Kubernetes cluster.
*/
readonly clusterUrn: pulumi.Output<string>;
/**
* A block representing the cluster's control plane firewall
*/
readonly controlPlaneFirewall: pulumi.Output<outputs.KubernetesClusterControlPlaneFirewall>;
/**
* The date and time when the node was created.
*/
readonly createdAt: pulumi.Output<string>;
/**
* **Use with caution.** When set to true, all associated DigitalOcean resources created via the Kubernetes API (load balancers, volumes, and volume snapshots) will be destroyed along with the cluster when it is destroyed.
*/
readonly destroyAllAssociatedResources: pulumi.Output<boolean | undefined>;
/**
* The base URL of the API server on the Kubernetes master node.
*/
readonly endpoint: pulumi.Output<string>;
/**
* Enable/disable the high availability control plane for a cluster. Once enabled for a cluster, high availability cannot be disabled. Default: false
*/
readonly ha: pulumi.Output<boolean | undefined>;
/**
* The public IPv4 address of the Kubernetes master node. This will not be set if high availability is configured on the cluster (v1.21+)
*/
readonly ipv4Address: pulumi.Output<string>;
/**
* A representation of the Kubernetes cluster's kubeconfig with the following attributes:
*/
readonly kubeConfigs: pulumi.Output<outputs.KubernetesClusterKubeConfig[]>;
/**
* The duration in seconds that the returned Kubernetes credentials will be valid. If not set or 0, the credentials will have a 7 day expiry.
*/
readonly kubeconfigExpireSeconds: pulumi.Output<number | undefined>;
/**
* A block representing the cluster's maintenance window. Updates will be applied within this window. If not specified, a default maintenance window will be chosen. `autoUpgrade` must be set to `true` for this to have an effect.
*/
readonly maintenancePolicy: pulumi.Output<outputs.KubernetesClusterMaintenancePolicy>;
/**
* A name for the Kubernetes cluster.
*/
readonly name: pulumi.Output<string>;
/**
* A block representing the cluster's default node pool. Additional node pools may be added to the cluster using the `digitalocean.KubernetesNodePool` resource. The following arguments may be specified:
*/
readonly nodePool: pulumi.Output<outputs.KubernetesClusterNodePool>;
/**
* Block containing options for the NVIDIA GPU device plugin component. If not specified, the component will be enabled by default for clusters with NVIDIA GPU nodes.
*/
readonly nvidiaGpuDevicePlugin: pulumi.Output<outputs.KubernetesClusterNvidiaGpuDevicePlugin>;
readonly rdmaSharedDevicePlugin: pulumi.Output<outputs.KubernetesClusterRdmaSharedDevicePlugin>;
/**
* The slug identifier for the region where the Kubernetes cluster will be created.
*/
readonly region: pulumi.Output<string>;
/**
* Enables or disables the DigitalOcean container registry integration for the cluster. This requires that a container registry has first been created for the account. Default: false
*/
readonly registryIntegration: pulumi.Output<boolean | undefined>;
/**
* Block containing options for the routing-agent component. If not specified, the routing-agent component will not be installed in the cluster.
*/
readonly routingAgent: pulumi.Output<outputs.KubernetesClusterRoutingAgent>;
/**
* The range of assignable IP addresses for services running in the Kubernetes cluster. For more information, see [here](https://docs.digitalocean.com/products/kubernetes/how-to/create-clusters/#create-with-vpc-native).
*/
readonly serviceSubnet: pulumi.Output<string>;
/**
* A string indicating the current status of the individual node.
*/
readonly status: pulumi.Output<string>;
/**
* Enable/disable surge upgrades for a cluster. Default: true
*/
readonly surgeUpgrade: pulumi.Output<boolean | undefined>;
/**
* A list of tag names to be applied to the Kubernetes cluster.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* The date and time when the node was last updated.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* The slug identifier for the version of Kubernetes used for the cluster. Use [doctl](https://github.com/digitalocean/doctl) to find the available versions `doctl kubernetes options versions`. (**Note:** A cluster may only be upgraded to newer versions in-place. If the version is decreased, a new resource will be created.)
*/
readonly version: pulumi.Output<string>;
/**
* The ID of the VPC where the Kubernetes cluster will be located.
*/
readonly vpcUuid: pulumi.Output<string>;
/**
* Create a KubernetesCluster 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: KubernetesClusterArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering KubernetesCluster resources.
*/
export interface KubernetesClusterState {
/**
* Block containing options for the AMD GPU device metrics exporter component.
*/
amdGpuDeviceMetricsExporterPlugin?: pulumi.Input<inputs.KubernetesClusterAmdGpuDeviceMetricsExporterPlugin>;
/**
* Block containing options for the AMD GPU device plugin component. If not specified, the component will be enabled by default for clusters with AMD GPU nodes.
*/
amdGpuDevicePlugin?: pulumi.Input<inputs.KubernetesClusterAmdGpuDevicePlugin>;
/**
* A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.
*/
autoUpgrade?: pulumi.Input<boolean>;
/**
* Block containing options for cluster auto-scaling.
*/
clusterAutoscalerConfigurations?: pulumi.Input<pulumi.Input<inputs.KubernetesClusterClusterAutoscalerConfiguration>[]>;
/**
* The range of IP addresses in the overlay network of the Kubernetes cluster. For more information, see [here](https://docs.digitalocean.com/products/kubernetes/how-to/create-clusters/#create-with-vpc-native).
*/
clusterSubnet?: pulumi.Input<string>;
/**
* The uniform resource name (URN) for the Kubernetes cluster.
*/
clusterUrn?: pulumi.Input<string>;
/**
* A block representing the cluster's control plane firewall
*/
controlPlaneFirewall?: pulumi.Input<inputs.KubernetesClusterControlPlaneFirewall>;
/**
* The date and time when the node was created.
*/
createdAt?: pulumi.Input<string>;
/**
* **Use with caution.** When set to true, all associated DigitalOcean resources created via the Kubernetes API (load balancers, volumes, and volume snapshots) will be destroyed along with the cluster when it is destroyed.
*/
destroyAllAssociatedResources?: pulumi.Input<boolean>;
/**
* The base URL of the API server on the Kubernetes master node.
*/
endpoint?: pulumi.Input<string>;
/**
* Enable/disable the high availability control plane for a cluster. Once enabled for a cluster, high availability cannot be disabled. Default: false
*/
ha?: pulumi.Input<boolean>;
/**
* The public IPv4 address of the Kubernetes master node. This will not be set if high availability is configured on the cluster (v1.21+)
*/
ipv4Address?: pulumi.Input<string>;
/**
* A representation of the Kubernetes cluster's kubeconfig with the following attributes:
*/
kubeConfigs?: pulumi.Input<pulumi.Input<inputs.KubernetesClusterKubeConfig>[]>;
/**
* The duration in seconds that the returned Kubernetes credentials will be valid. If not set or 0, the credentials will have a 7 day expiry.
*/
kubeconfigExpireSeconds?: pulumi.Input<number>;
/**
* A block representing the cluster's maintenance window. Updates will be applied within this window. If not specified, a default maintenance window will be chosen. `autoUpgrade` must be set to `true` for this to have an effect.
*/
maintenancePolicy?: pulumi.Input<inputs.KubernetesClusterMaintenancePolicy>;
/**
* A name for the Kubernetes cluster.
*/
name?: pulumi.Input<string>;
/**
* A block representing the cluster's default node pool. Additional node pools may be added to the cluster using the `digitalocean.KubernetesNodePool` resource. The following arguments may be specified:
*/
nodePool?: pulumi.Input<inputs.KubernetesClusterNodePool>;
/**
* Block containing options for the NVIDIA GPU device plugin component. If not specified, the component will be enabled by default for clusters with NVIDIA GPU nodes.
*/
nvidiaGpuDevicePlugin?: pulumi.Input<inputs.KubernetesClusterNvidiaGpuDevicePlugin>;
rdmaSharedDevicePlugin?: pulumi.Input<inputs.KubernetesClusterRdmaSharedDevicePlugin>;
/**
* The slug identifier for the region where the Kubernetes cluster will be created.
*/
region?: pulumi.Input<string | enums.Region>;
/**
* Enables or disables the DigitalOcean container registry integration for the cluster. This requires that a container registry has first been created for the account. Default: false
*/
registryIntegration?: pulumi.Input<boolean>;
/**
* Block containing options for the routing-agent component. If not specified, the routing-agent component will not be installed in the cluster.
*/
routingAgent?: pulumi.Input<inputs.KubernetesClusterRoutingAgent>;
/**
* The range of assignable IP addresses for services running in the Kubernetes cluster. For more information, see [here](https://docs.digitalocean.com/products/kubernetes/how-to/create-clusters/#create-with-vpc-native).
*/
serviceSubnet?: pulumi.Input<string>;
/**
* A string indicating the current status of the individual node.
*/
status?: pulumi.Input<string>;
/**
* Enable/disable surge upgrades for a cluster. Default: true
*/
surgeUpgrade?: pulumi.Input<boolean>;
/**
* A list of tag names to be applied to the Kubernetes cluster.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The date and time when the node was last updated.
*/
updatedAt?: pulumi.Input<string>;
/**
* The slug identifier for the version of Kubernetes used for the cluster. Use [doctl](https://github.com/digitalocean/doctl) to find the available versions `doctl kubernetes options versions`. (**Note:** A cluster may only be upgraded to newer versions in-place. If the version is decreased, a new resource will be created.)
*/
version?: pulumi.Input<string>;
/**
* The ID of the VPC where the Kubernetes cluster will be located.
*/
vpcUuid?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a KubernetesCluster resource.
*/
export interface KubernetesClusterArgs {
/**
* Block containing options for the AMD GPU device metrics exporter component.
*/
amdGpuDeviceMetricsExporterPlugin?: pulumi.Input<inputs.KubernetesClusterAmdGpuDeviceMetricsExporterPlugin>;
/**
* Block containing options for the AMD GPU device plugin component. If not specified, the component will be enabled by default for clusters with AMD GPU nodes.
*/
amdGpuDevicePlugin?: pulumi.Input<inputs.KubernetesClusterAmdGpuDevicePlugin>;
/**
* A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.
*/
autoUpgrade?: pulumi.Input<boolean>;
/**
* Block containing options for cluster auto-scaling.
*/
clusterAutoscalerConfigurations?: pulumi.Input<pulumi.Input<inputs.KubernetesClusterClusterAutoscalerConfiguration>[]>;
/**
* The range of IP addresses in the overlay network of the Kubernetes cluster. For more information, see [here](https://docs.digitalocean.com/products/kubernetes/how-to/create-clusters/#create-with-vpc-native).
*/
clusterSubnet?: pulumi.Input<string>;
/**
* A block representing the cluster's control plane firewall
*/
controlPlaneFirewall?: pulumi.Input<inputs.KubernetesClusterControlPlaneFirewall>;
/**
* **Use with caution.** When set to true, all associated DigitalOcean resources created via the Kubernetes API (load balancers, volumes, and volume snapshots) will be destroyed along with the cluster when it is destroyed.
*/
destroyAllAssociatedResources?: pulumi.Input<boolean>;
/**
* Enable/disable the high availability control plane for a cluster. Once enabled for a cluster, high availability cannot be disabled. Default: false
*/
ha?: pulumi.Input<boolean>;
/**
* The duration in seconds that the returned Kubernetes credentials will be valid. If not set or 0, the credentials will have a 7 day expiry.
*/
kubeconfigExpireSeconds?: pulumi.Input<number>;
/**
* A block representing the cluster's maintenance window. Updates will be applied within this window. If not specified, a default maintenance window will be chosen. `autoUpgrade` must be set to `true` for this to have an effect.
*/
maintenancePolicy?: pulumi.Input<inputs.KubernetesClusterMaintenancePolicy>;
/**
* A name for the Kubernetes cluster.
*/
name?: pulumi.Input<string>;
/**
* A block representing the cluster's default node pool. Additional node pools may be added to the cluster using the `digitalocean.KubernetesNodePool` resource. The following arguments may be specified:
*/
nodePool: pulumi.Input<inputs.KubernetesClusterNodePool>;
/**
* Block containing options for the NVIDIA GPU device plugin component. If not specified, the component will be enabled by default for clusters with NVIDIA GPU nodes.
*/
nvidiaGpuDevicePlugin?: pulumi.Input<inputs.KubernetesClusterNvidiaGpuDevicePlugin>;
rdmaSharedDevicePlugin?: pulumi.Input<inputs.KubernetesClusterRdmaSharedDevicePlugin>;
/**
* The slug identifier for the region where the Kubernetes cluster will be created.
*/
region: pulumi.Input<string | enums.Region>;
/**
* Enables or disables the DigitalOcean container registry integration for the cluster. This requires that a container registry has first been created for the account. Default: false
*/
registryIntegration?: pulumi.Input<boolean>;
/**
* Block containing options for the routing-agent component. If not specified, the routing-agent component will not be installed in the cluster.
*/
routingAgent?: pulumi.Input<inputs.KubernetesClusterRoutingAgent>;
/**
* The range of assignable IP addresses for services running in the Kubernetes cluster. For more information, see [here](https://docs.digitalocean.com/products/kubernetes/how-to/create-clusters/#create-with-vpc-native).
*/
serviceSubnet?: pulumi.Input<string>;
/**
* Enable/disable surge upgrades for a cluster. Default: true
*/
surgeUpgrade?: pulumi.Input<boolean>;
/**
* A list of tag names to be applied to the Kubernetes cluster.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The slug identifier for the version of Kubernetes used for the cluster. Use [doctl](https://github.com/digitalocean/doctl) to find the available versions `doctl kubernetes options versions`. (**Note:** A cluster may only be upgraded to newer versions in-place. If the version is decreased, a new resource will be created.)
*/
version: pulumi.Input<string>;
/**
* The ID of the VPC where the Kubernetes cluster will be located.
*/
vpcUuid?: pulumi.Input<string>;
}