@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
1,039 lines (1,038 loc) • 43.2 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Provides a CCE cluster resource.
*
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const myvpc = new huaweicloud.vpc.Vpc("myvpc", {cidr: "192.168.0.0/16"});
* const mysubnet = new huaweicloud.vpc.Subnet("mysubnet", {
* cidr: "192.168.0.0/16",
* gatewayIp: "192.168.0.1",
* primaryDns: "100.125.1.250",
* secondaryDns: "100.125.21.250",
* vpcId: myvpc.id,
* });
* const cluster = new huaweicloud.cce.Cluster("cluster", {
* flavorId: "cce.s1.small",
* vpcId: myvpc.id,
* subnetId: mysubnet.id,
* containerNetworkType: "overlay_l2",
* });
* ```
* ### Cluster With EIP
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const myvpc = new huaweicloud.vpc.Vpc("myvpc", {cidr: "192.168.0.0/16"});
* const mysubnet = new huaweicloud.vpc.Subnet("mysubnet", {
* cidr: "192.168.0.0/16",
* gatewayIp: "192.168.0.1",
* primaryDns: "100.125.1.250",
* secondaryDns: "100.125.21.250",
* vpcId: myvpc.id,
* });
* const myeip = new huaweicloud.vpc.Eip("myeip", {
* publicip: {
* type: "5_bgp",
* },
* bandwidth: {
* name: "test",
* size: 8,
* shareType: "PER",
* chargeMode: "traffic",
* },
* });
* const cluster = new huaweicloud.cce.Cluster("cluster", {
* clusterType: "VirtualMachine",
* flavorId: "cce.s1.small",
* vpcId: myvpc.id,
* subnetId: mysubnet.id,
* containerNetworkType: "overlay_l2",
* authenticationMode: "rbac",
* eip: myeip.address,
* });
* ```
* ### CCE HA Cluster
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const vpcId = config.requireObject("vpcId");
* const subnetId = config.requireObject("subnetId");
* const cluster = new huaweicloud.cce.Cluster("cluster", {
* flavorId: "cce.s2.small",
* vpcId: vpcId,
* subnetId: subnetId,
* containerNetworkType: "overlay_l2",
* masters: [
* {
* availabilityZone: "cn-north-4a",
* },
* {
* availabilityZone: "cn-north-4b",
* },
* {
* availabilityZone: "cn-north-4c",
* },
* ],
* });
* ```
* ### Cluster with Component Configurations
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const vpcId = config.requireObject("vpcId");
* const subnetId = config.requireObject("subnetId");
* const cluster = new huaweicloud.cce.Cluster("cluster", {
* flavorId: "cce.s1.small",
* vpcId: vpcId,
* subnetId: subnetId,
* containerNetworkType: "overlay_l2",
* componentConfigurations: [{
* name: "kube-apiserver",
* configurations: JSON.stringify([{
* name: "default-not-ready-toleration-seconds",
* value: "100",
* }]),
* }],
* });
* ```
*
* ## Import
*
* Cluster can be imported using the cluster ID, e.g.
*
* ```sh
* $ pulumi import huaweicloud:Cce/cluster:Cluster huaweicloud_cce_cluster.cluster_1 4779ab1c-7c1a-44b1-a02e-93dfc361b32d
* ```
*
* Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`delete_efs`, `delete_eni`, `delete_evs`, `delete_net`, `delete_obs`, `delete_sfs` and `delete_all`. It is generally recommended running `terraform plan` after importing an CCE cluster. You can then decide if changes should be applied to the cluster, or the resource definition should be updated to align with the cluster. Also you can ignore changes as below. hcl resource "huaweicloud_cce_cluster" "cluster_1" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* delete_efs, delete_obs,
*
* ]
*
* } }
*/
export declare 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: string, id: pulumi.Input<pulumi.ID>, state?: ClusterState, opts?: pulumi.CustomResourceOptions): Cluster;
/**
* 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: any): obj is Cluster;
/**
* Specifies the display name of a cluster. The value of `alias` cannot be the same as the `name`
* and display names of other clusters.
*/
readonly alias: pulumi.Output<string>;
/**
* schema: Internal
*/
readonly annotations: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Specifies the CA root certificate provided in the
* **authenticating_proxy** mode. The input value can be a Base64 encoded string or not.
* Changing this parameter will create a new cluster resource.
*/
readonly authenticatingProxyCa: pulumi.Output<string | undefined>;
/**
* Specifies the Client certificate provided in the
* **authenticating_proxy** mode. The input value can be a Base64 encoded string or not.
* Changing this parameter will create a new cluster resource.
*/
readonly authenticatingProxyCert: pulumi.Output<string | undefined>;
/**
* Specifies the private key of the client certificate
* provided in the **authenticating_proxy** mode. The input value can be a Base64 encoded string or not.
* Changing this parameter will create a new cluster resource.
*/
readonly authenticatingProxyPrivateKey: pulumi.Output<string | undefined>;
/**
* Specifies the authentication mode of the cluster, possible values
* are **rbac** and **authenticating_proxy**. Defaults to **rbac**.
* Changing this parameter will create a new cluster resource.
*/
readonly authenticationMode: pulumi.Output<string | undefined>;
/**
* @deprecated Deprecated
*/
readonly autoPay: pulumi.Output<string | undefined>;
/**
* Specifies whether auto renew is enabled. Valid values are **true** and **false**.
*/
readonly autoRenew: pulumi.Output<string | undefined>;
/**
* @deprecated use charging_mode instead
*/
readonly billingMode: pulumi.Output<number>;
/**
* The category of the cluster. The value can be **CCE** and **Turbo**.
*/
readonly category: pulumi.Output<string>;
/**
* The certificate clusters. Structure is documented below.
*/
readonly certificateClusters: pulumi.Output<outputs.Cce.ClusterCertificateCluster[]>;
/**
* The certificate users. Structure is documented below.
*/
readonly certificateUsers: pulumi.Output<outputs.Cce.ClusterCertificateUser[]>;
/**
* Specifies the charging mode of the CCE cluster.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
* Changing this parameter will create a new cluster resource.
*/
readonly chargingMode: pulumi.Output<string>;
/**
* Specifies the cluster Type, possible values are **VirtualMachine** and
* **ARM64**. Defaults to **VirtualMachine**. Changing this parameter will create a new cluster resource.
*/
readonly clusterType: pulumi.Output<string | undefined>;
/**
* Specifies the cluster version, defaults to the latest supported
* version. Changing this parameter will not upgrade the cluster. If you want to upgrade the cluster, please use
* resource `huaweicloud.Cce.ClusterUpgrade`. After upgrading cluster successfully, you can update this parameter
* to avoid unexpected changing plan.
*/
readonly clusterVersion: pulumi.Output<string>;
/**
* Specifies the kubernetes component configurations.
* For details, see [documentation](https://support.huaweicloud.com/intl/en-us/usermanual-cce/cce_10_0213.html).
* The object structure is documented below.
*/
readonly componentConfigurations: pulumi.Output<outputs.Cce.ClusterComponentConfiguration[] | undefined>;
/**
* Specifies the container network segments.
* In clusters of v1.21 and later, when the `containerNetworkType` is **vpc-router**, you can add multiple container
* segments, separated with comma (,). In other situations, only the first segment takes effect.
*/
readonly containerNetworkCidr: pulumi.Output<string>;
/**
* Specifies the container network type.
* Changing this parameter will create a new cluster resource. Possible values:
* + **overlay_l2**: An overlayL2 network built for containers by using Open vSwitch(OVS).
* + **vpc-router**: An vpc-router network built for containers by using ipvlan and custom VPC routes.
* + **eni**: A Yangtse network built for CCE Turbo cluster. The container network deeply integrates the native ENI
* capability of VPC, uses the VPC CIDR block to allocate container addresses, and supports direct connections between
* ELB and containers to provide high performance.
*/
readonly containerNetworkType: pulumi.Output<string>;
/**
* Specifies the custom san to add to certificate (array of string).
*/
readonly customSans: pulumi.Output<string[]>;
/**
* Specified whether to delete all associated storage resources when deleting the CCE
* cluster. valid values are **true**, **try** and **false**. Default is **false**.
*/
readonly deleteAll: pulumi.Output<string | undefined>;
/**
* Specified whether to unbind associated SFS Turbo file systems when deleting the CCE
* cluster. valid values are **true**, **try** and **false**. Default is **false**.
*/
readonly deleteEfs: pulumi.Output<string | undefined>;
/**
* schema: Internal
*/
readonly deleteEni: pulumi.Output<string | undefined>;
/**
* Specified whether to delete associated EVS disks when deleting the CCE cluster.
* valid values are **true**, **try** and **false**. Default is **false**.
*/
readonly deleteEvs: pulumi.Output<string | undefined>;
/**
* schema: Internal
*/
readonly deleteNet: pulumi.Output<string | undefined>;
/**
* Specified whether to delete associated OBS buckets when deleting the CCE cluster.
* valid values are **true**, **try** and **false**. Default is **false**.
*/
readonly deleteObs: pulumi.Output<string | undefined>;
/**
* Specified whether to delete associated SFS file systems when deleting the CCE
* cluster. valid values are **true**, **try** and **false**. Default is **false**.
*/
readonly deleteSfs: pulumi.Output<string | undefined>;
/**
* Specifies the cluster description.
*/
readonly description: pulumi.Output<string>;
/**
* Specifies the EIP address of the cluster.
*/
readonly eip: pulumi.Output<string | undefined>;
/**
* schema: Internal
*/
readonly enableDistributeManagement: pulumi.Output<boolean | undefined>;
/**
* The ENI network segment. This value is valid when only one eniSubnetId is specified.
*/
readonly eniSubnetCidr: pulumi.Output<string>;
/**
* Specifies the **IPv4 subnet ID** of the subnet where the ENI resides.
* Specified when creating a CCE Turbo cluster. You can add multiple IPv4 subnet ID, separated with comma (,).
* Only adding subnets is allowed, removing subnets is not allowed.
*/
readonly eniSubnetId: pulumi.Output<string>;
/**
* The enterprise project ID of the CCE cluster.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* schema: Internal
*/
readonly extendParam: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Specifies the extended parameter.
* The object structure is documented below.
* Changing this parameter will create a new cluster resource.
*/
readonly extendParams: pulumi.Output<outputs.Cce.ClusterExtendParam[] | undefined>;
/**
* Specifies the cluster specifications.
* Possible values:
* + **cce.s1.small**: small-scale single cluster (up to 50 nodes).
* + **cce.s1.medium**: medium-scale single cluster (up to 200 nodes).
* + **cce.s2.small**: small-scale HA cluster (up to 50 nodes).
* + **cce.s2.medium**: medium-scale HA cluster (up to 200 nodes).
* + **cce.s2.large**: large-scale HA cluster (up to 1000 nodes).
* + **cce.s2.xlarge**: large-scale HA cluster (up to 2000 nodes).
*/
readonly flavorId: pulumi.Output<string>;
/**
* Specifies whether to hibernate the CCE cluster. Defaults to **false**. After a cluster is
* hibernated, resources such as workloads cannot be created or managed in the cluster, and the cluster cannot be
* deleted.
*/
readonly hibernate: pulumi.Output<boolean | undefined>;
/**
* schema: Internal
*/
readonly highwaySubnetId: pulumi.Output<string>;
/**
* Specifies whether to enable IPv6 in the cluster.
* Changing this parameter will create a new cluster resource.
*/
readonly ipv6Enable: pulumi.Output<boolean>;
/**
* Raw Kubernetes config to be used by kubectl and other compatible tools.
*/
readonly kubeConfigRaw: pulumi.Output<string>;
/**
* Specifies the service forwarding mode.
* Changing this parameter will create a new cluster resource. Two modes are available:
*/
readonly kubeProxyMode: pulumi.Output<string>;
/**
* schema: Internal
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Specified whether to delete LTS resources when deleting the CCE cluster.
* Valid values are:
* + **Delete_Log_Group**: Delete the log group, ignore it if it fails, and continue with the subsequent process.
* + **Delete_Master_Log_Stream**: Delete the the log stream, ignore it if it fails, and continue the subsequent process.
* The default option.
* + **Retain**: Skip the deletion process.
*/
readonly ltsReclaimPolicy: pulumi.Output<string | undefined>;
/**
* Specifies the advanced configuration of master nodes.
* The object structure is documented below.
* This parameter and `multiAz` are alternative. Changing this parameter will create a new cluster resource.
*/
readonly masters: pulumi.Output<outputs.Cce.ClusterMaster[]>;
/**
* Specifies whether to enable multiple AZs for the cluster, only when using HA
* flavors. Changing this parameter will create a new cluster resource. This parameter and `masters` are alternative.
*/
readonly multiAz: pulumi.Output<boolean | undefined>;
/**
* Specifies the component name.
*/
readonly name: pulumi.Output<string>;
/**
* Specifies the charging period of the CCE cluster.
* If `periodUnit` is set to **month**, the value ranges from 1 to 9.
* If `periodUnit` is set to **year**, the value ranges from 1 to 3.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
readonly period: pulumi.Output<number | undefined>;
/**
* Specifies the charging period unit of the CCE cluster.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
readonly periodUnit: pulumi.Output<string | undefined>;
/**
* Specifies the region in which to create the CCE cluster resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new cluster resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the default worker node security group ID of the cluster.
* If left empty, the system will automatically create a default worker node security group for you.
* The default worker node security group needs to allow access from certain ports to ensure normal communications.
* For details, see [documentation](https://support.huaweicloud.com/intl/en-us/cce_faq/cce_faq_00265.html).
* If updated, the modified security group will only be applied to nodes newly created or accepted.
* For existing nodes, you need to manually modify the security group rules for them.
*/
readonly securityGroupId: pulumi.Output<string>;
/**
* Specifies the service network segment.
* Changing this parameter will create a new cluster resource.
*/
readonly serviceNetworkCidr: pulumi.Output<string>;
/**
* Cluster status information.
*/
readonly status: pulumi.Output<string>;
/**
* Specifies the ID of the subnet used to create the node which should be
* configured with a *DNS address*. Changing this parameter will create a new cluster resource.
*/
readonly subnetId: pulumi.Output<string>;
/**
* Whether Istio is supported in the cluster.
*/
readonly supportIstio: pulumi.Output<boolean>;
/**
* Specifies the tags of the CCE cluster, key/value pair format.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Specifies the ID of the VPC used to create the node.
* Changing this parameter will create a new cluster resource.
*/
readonly vpcId: pulumi.Output<string>;
/**
* Create a Cluster 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: ClusterArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Cluster resources.
*/
export interface ClusterState {
/**
* Specifies the display name of a cluster. The value of `alias` cannot be the same as the `name`
* and display names of other clusters.
*/
alias?: pulumi.Input<string>;
/**
* schema: Internal
*/
annotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the CA root certificate provided in the
* **authenticating_proxy** mode. The input value can be a Base64 encoded string or not.
* Changing this parameter will create a new cluster resource.
*/
authenticatingProxyCa?: pulumi.Input<string>;
/**
* Specifies the Client certificate provided in the
* **authenticating_proxy** mode. The input value can be a Base64 encoded string or not.
* Changing this parameter will create a new cluster resource.
*/
authenticatingProxyCert?: pulumi.Input<string>;
/**
* Specifies the private key of the client certificate
* provided in the **authenticating_proxy** mode. The input value can be a Base64 encoded string or not.
* Changing this parameter will create a new cluster resource.
*/
authenticatingProxyPrivateKey?: pulumi.Input<string>;
/**
* Specifies the authentication mode of the cluster, possible values
* are **rbac** and **authenticating_proxy**. Defaults to **rbac**.
* Changing this parameter will create a new cluster resource.
*/
authenticationMode?: pulumi.Input<string>;
/**
* @deprecated Deprecated
*/
autoPay?: pulumi.Input<string>;
/**
* Specifies whether auto renew is enabled. Valid values are **true** and **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* @deprecated use charging_mode instead
*/
billingMode?: pulumi.Input<number>;
/**
* The category of the cluster. The value can be **CCE** and **Turbo**.
*/
category?: pulumi.Input<string>;
/**
* The certificate clusters. Structure is documented below.
*/
certificateClusters?: pulumi.Input<pulumi.Input<inputs.Cce.ClusterCertificateCluster>[]>;
/**
* The certificate users. Structure is documented below.
*/
certificateUsers?: pulumi.Input<pulumi.Input<inputs.Cce.ClusterCertificateUser>[]>;
/**
* Specifies the charging mode of the CCE cluster.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
* Changing this parameter will create a new cluster resource.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the cluster Type, possible values are **VirtualMachine** and
* **ARM64**. Defaults to **VirtualMachine**. Changing this parameter will create a new cluster resource.
*/
clusterType?: pulumi.Input<string>;
/**
* Specifies the cluster version, defaults to the latest supported
* version. Changing this parameter will not upgrade the cluster. If you want to upgrade the cluster, please use
* resource `huaweicloud.Cce.ClusterUpgrade`. After upgrading cluster successfully, you can update this parameter
* to avoid unexpected changing plan.
*/
clusterVersion?: pulumi.Input<string>;
/**
* Specifies the kubernetes component configurations.
* For details, see [documentation](https://support.huaweicloud.com/intl/en-us/usermanual-cce/cce_10_0213.html).
* The object structure is documented below.
*/
componentConfigurations?: pulumi.Input<pulumi.Input<inputs.Cce.ClusterComponentConfiguration>[]>;
/**
* Specifies the container network segments.
* In clusters of v1.21 and later, when the `containerNetworkType` is **vpc-router**, you can add multiple container
* segments, separated with comma (,). In other situations, only the first segment takes effect.
*/
containerNetworkCidr?: pulumi.Input<string>;
/**
* Specifies the container network type.
* Changing this parameter will create a new cluster resource. Possible values:
* + **overlay_l2**: An overlayL2 network built for containers by using Open vSwitch(OVS).
* + **vpc-router**: An vpc-router network built for containers by using ipvlan and custom VPC routes.
* + **eni**: A Yangtse network built for CCE Turbo cluster. The container network deeply integrates the native ENI
* capability of VPC, uses the VPC CIDR block to allocate container addresses, and supports direct connections between
* ELB and containers to provide high performance.
*/
containerNetworkType?: pulumi.Input<string>;
/**
* Specifies the custom san to add to certificate (array of string).
*/
customSans?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specified whether to delete all associated storage resources when deleting the CCE
* cluster. valid values are **true**, **try** and **false**. Default is **false**.
*/
deleteAll?: pulumi.Input<string>;
/**
* Specified whether to unbind associated SFS Turbo file systems when deleting the CCE
* cluster. valid values are **true**, **try** and **false**. Default is **false**.
*/
deleteEfs?: pulumi.Input<string>;
/**
* schema: Internal
*/
deleteEni?: pulumi.Input<string>;
/**
* Specified whether to delete associated EVS disks when deleting the CCE cluster.
* valid values are **true**, **try** and **false**. Default is **false**.
*/
deleteEvs?: pulumi.Input<string>;
/**
* schema: Internal
*/
deleteNet?: pulumi.Input<string>;
/**
* Specified whether to delete associated OBS buckets when deleting the CCE cluster.
* valid values are **true**, **try** and **false**. Default is **false**.
*/
deleteObs?: pulumi.Input<string>;
/**
* Specified whether to delete associated SFS file systems when deleting the CCE
* cluster. valid values are **true**, **try** and **false**. Default is **false**.
*/
deleteSfs?: pulumi.Input<string>;
/**
* Specifies the cluster description.
*/
description?: pulumi.Input<string>;
/**
* Specifies the EIP address of the cluster.
*/
eip?: pulumi.Input<string>;
/**
* schema: Internal
*/
enableDistributeManagement?: pulumi.Input<boolean>;
/**
* The ENI network segment. This value is valid when only one eniSubnetId is specified.
*/
eniSubnetCidr?: pulumi.Input<string>;
/**
* Specifies the **IPv4 subnet ID** of the subnet where the ENI resides.
* Specified when creating a CCE Turbo cluster. You can add multiple IPv4 subnet ID, separated with comma (,).
* Only adding subnets is allowed, removing subnets is not allowed.
*/
eniSubnetId?: pulumi.Input<string>;
/**
* The enterprise project ID of the CCE cluster.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* schema: Internal
*/
extendParam?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the extended parameter.
* The object structure is documented below.
* Changing this parameter will create a new cluster resource.
*/
extendParams?: pulumi.Input<pulumi.Input<inputs.Cce.ClusterExtendParam>[]>;
/**
* Specifies the cluster specifications.
* Possible values:
* + **cce.s1.small**: small-scale single cluster (up to 50 nodes).
* + **cce.s1.medium**: medium-scale single cluster (up to 200 nodes).
* + **cce.s2.small**: small-scale HA cluster (up to 50 nodes).
* + **cce.s2.medium**: medium-scale HA cluster (up to 200 nodes).
* + **cce.s2.large**: large-scale HA cluster (up to 1000 nodes).
* + **cce.s2.xlarge**: large-scale HA cluster (up to 2000 nodes).
*/
flavorId?: pulumi.Input<string>;
/**
* Specifies whether to hibernate the CCE cluster. Defaults to **false**. After a cluster is
* hibernated, resources such as workloads cannot be created or managed in the cluster, and the cluster cannot be
* deleted.
*/
hibernate?: pulumi.Input<boolean>;
/**
* schema: Internal
*/
highwaySubnetId?: pulumi.Input<string>;
/**
* Specifies whether to enable IPv6 in the cluster.
* Changing this parameter will create a new cluster resource.
*/
ipv6Enable?: pulumi.Input<boolean>;
/**
* Raw Kubernetes config to be used by kubectl and other compatible tools.
*/
kubeConfigRaw?: pulumi.Input<string>;
/**
* Specifies the service forwarding mode.
* Changing this parameter will create a new cluster resource. Two modes are available:
*/
kubeProxyMode?: pulumi.Input<string>;
/**
* schema: Internal
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specified whether to delete LTS resources when deleting the CCE cluster.
* Valid values are:
* + **Delete_Log_Group**: Delete the log group, ignore it if it fails, and continue with the subsequent process.
* + **Delete_Master_Log_Stream**: Delete the the log stream, ignore it if it fails, and continue the subsequent process.
* The default option.
* + **Retain**: Skip the deletion process.
*/
ltsReclaimPolicy?: pulumi.Input<string>;
/**
* Specifies the advanced configuration of master nodes.
* The object structure is documented below.
* This parameter and `multiAz` are alternative. Changing this parameter will create a new cluster resource.
*/
masters?: pulumi.Input<pulumi.Input<inputs.Cce.ClusterMaster>[]>;
/**
* Specifies whether to enable multiple AZs for the cluster, only when using HA
* flavors. Changing this parameter will create a new cluster resource. This parameter and `masters` are alternative.
*/
multiAz?: pulumi.Input<boolean>;
/**
* Specifies the component name.
*/
name?: pulumi.Input<string>;
/**
* Specifies the charging period of the CCE cluster.
* If `periodUnit` is set to **month**, the value ranges from 1 to 9.
* If `periodUnit` is set to **year**, the value ranges from 1 to 3.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the CCE cluster.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the region in which to create the CCE cluster resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new cluster resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the default worker node security group ID of the cluster.
* If left empty, the system will automatically create a default worker node security group for you.
* The default worker node security group needs to allow access from certain ports to ensure normal communications.
* For details, see [documentation](https://support.huaweicloud.com/intl/en-us/cce_faq/cce_faq_00265.html).
* If updated, the modified security group will only be applied to nodes newly created or accepted.
* For existing nodes, you need to manually modify the security group rules for them.
*/
securityGroupId?: pulumi.Input<string>;
/**
* Specifies the service network segment.
* Changing this parameter will create a new cluster resource.
*/
serviceNetworkCidr?: pulumi.Input<string>;
/**
* Cluster status information.
*/
status?: pulumi.Input<string>;
/**
* Specifies the ID of the subnet used to create the node which should be
* configured with a *DNS address*. Changing this parameter will create a new cluster resource.
*/
subnetId?: pulumi.Input<string>;
/**
* Whether Istio is supported in the cluster.
*/
supportIstio?: pulumi.Input<boolean>;
/**
* Specifies the tags of the CCE cluster, key/value pair format.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the ID of the VPC used to create the node.
* Changing this parameter will create a new cluster resource.
*/
vpcId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Cluster resource.
*/
export interface ClusterArgs {
/**
* Specifies the display name of a cluster. The value of `alias` cannot be the same as the `name`
* and display names of other clusters.
*/
alias?: pulumi.Input<string>;
/**
* schema: Internal
*/
annotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the CA root certificate provided in the
* **authenticating_proxy** mode. The input value can be a Base64 encoded string or not.
* Changing this parameter will create a new cluster resource.
*/
authenticatingProxyCa?: pulumi.Input<string>;
/**
* Specifies the Client certificate provided in the
* **authenticating_proxy** mode. The input value can be a Base64 encoded string or not.
* Changing this parameter will create a new cluster resource.
*/
authenticatingProxyCert?: pulumi.Input<string>;
/**
* Specifies the private key of the client certificate
* provided in the **authenticating_proxy** mode. The input value can be a Base64 encoded string or not.
* Changing this parameter will create a new cluster resource.
*/
authenticatingProxyPrivateKey?: pulumi.Input<string>;
/**
* Specifies the authentication mode of the cluster, possible values
* are **rbac** and **authenticating_proxy**. Defaults to **rbac**.
* Changing this parameter will create a new cluster resource.
*/
authenticationMode?: pulumi.Input<string>;
/**
* @deprecated Deprecated
*/
autoPay?: pulumi.Input<string>;
/**
* Specifies whether auto renew is enabled. Valid values are **true** and **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* @deprecated use charging_mode instead
*/
billingMode?: pulumi.Input<number>;
/**
* Specifies the charging mode of the CCE cluster.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
* Changing this parameter will create a new cluster resource.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the cluster Type, possible values are **VirtualMachine** and
* **ARM64**. Defaults to **VirtualMachine**. Changing this parameter will create a new cluster resource.
*/
clusterType?: pulumi.Input<string>;
/**
* Specifies the cluster version, defaults to the latest supported
* version. Changing this parameter will not upgrade the cluster. If you want to upgrade the cluster, please use
* resource `huaweicloud.Cce.ClusterUpgrade`. After upgrading cluster successfully, you can update this parameter
* to avoid unexpected changing plan.
*/
clusterVersion?: pulumi.Input<string>;
/**
* Specifies the kubernetes component configurations.
* For details, see [documentation](https://support.huaweicloud.com/intl/en-us/usermanual-cce/cce_10_0213.html).
* The object structure is documented below.
*/
componentConfigurations?: pulumi.Input<pulumi.Input<inputs.Cce.ClusterComponentConfiguration>[]>;
/**
* Specifies the container network segments.
* In clusters of v1.21 and later, when the `containerNetworkType` is **vpc-router**, you can add multiple container
* segments, separated with comma (,). In other situations, only the first segment takes effect.
*/
containerNetworkCidr?: pulumi.Input<string>;
/**
* Specifies the container network type.
* Changing this parameter will create a new cluster resource. Possible values:
* + **overlay_l2**: An overlayL2 network built for containers by using Open vSwitch(OVS).
* + **vpc-router**: An vpc-router network built for containers by using ipvlan and custom VPC routes.
* + **eni**: A Yangtse network built for CCE Turbo cluster. The container network deeply integrates the native ENI
* capability of VPC, uses the VPC CIDR block to allocate container addresses, and supports direct connections between
* ELB and containers to provide high performance.
*/
containerNetworkType: pulumi.Input<string>;
/**
* Specifies the custom san to add to certificate (array of string).
*/
customSans?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specified whether to delete all associated storage resources when deleting the CCE
* cluster. valid values are **true**, **try** and **false**. Default is **false**.
*/
deleteAll?: pulumi.Input<string>;
/**
* Specified whether to unbind associated SFS Turbo file systems when deleting the CCE
* cluster. valid values are **true**, **try** and **false**. Default is **false**.
*/
deleteEfs?: pulumi.Input<string>;
/**
* schema: Internal
*/
deleteEni?: pulumi.Input<string>;
/**
* Specified whether to delete associated EVS disks when deleting the CCE cluster.
* valid values are **true**, **try** and **false**. Default is **false**.
*/
deleteEvs?: pulumi.Input<string>;
/**
* schema: Internal
*/
deleteNet?: pulumi.Input<string>;
/**
* Specified whether to delete associated OBS buckets when deleting the CCE cluster.
* valid values are **true**, **try** and **false**. Default is **false**.
*/
deleteObs?: pulumi.Input<string>;
/**
* Specified whether to delete associated SFS file systems when deleting the CCE
* cluster. valid values are **true**, **try** and **false**. Default is **false**.
*/
deleteSfs?: pulumi.Input<string>;
/**
* Specifies the cluster description.
*/
description?: pulumi.Input<string>;
/**
* Specifies the EIP address of the cluster.
*/
eip?: pulumi.Input<string>;
/**
* schema: Internal
*/
enableDistributeManagement?: pulumi.Input<boolean>;
/**
* The ENI network segment. This value is valid when only one eniSubnetId is specified.
*/
eniSubnetCidr?: pulumi.Input<string>;
/**
* Specifies the **IPv4 subnet ID** of the subnet where the ENI resides.
* Specified when creating a CCE Turbo cluster. You can add multiple IPv4 subnet ID, separated with comma (,).
* Only adding subnets is allowed, removing subnets is not allowed.
*/
eniSubnetId?: pulumi.Input<string>;
/**
* The enterprise project ID of the CCE cluster.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* schema: Internal
*/
extendParam?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the extended parameter.
* The object structure is documented below.
* Changing this parameter will create a new cluster resource.
*/
extendParams?: pulumi.Input<pulumi.Input<inputs.Cce.ClusterExtendParam>[]>;
/**
* Specifies the cluster specifications.
* Possible values:
* + **cce.s1.small**: small-scale single cluster (up to 50 nodes).
* + **cce.s1.medium**: medium-scale single cluster (up to 200 nodes).
* + **cce.s2.small**: small-scale HA cluster (up to 50 nodes).
* + **cce.s2.medium**: medium-scale HA cluster (up to 200 nodes).
* + **cce.s2.large**: large-scale HA cluster (up to 1000 nodes).
* + **cce.s2.xlarge**: large-scale HA cluster (up to 2000 nodes).
*/
flavorId: pulumi.Input<string>;
/**
* Specifies whether to hibernate the CCE cluster. Defaults to **false**. After a cluster is
* hibernated, resources such as workloads cannot be created or managed in the cluster, and the cluster cannot be
* deleted.
*/
hibernate?: pulumi.Input<boolean>;
/**
* schema: Internal
*/
highwaySubnetId?: pulumi.Input<string>;
/**
* Specifies whether to enable IPv6 in the cluster.
* Changing this parameter will create a new cluster resource.
*/
ipv6Enable?: pulumi.Input<boolean>;
/**
* Specifies the service forwarding mode.
* Changing this parameter will create a new cluster resource. Two modes are available:
*/
kubeProxyMode?: pulumi.Input<string>;
/**
* schema: Internal
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specified whether to delete LTS resources when deleting the CCE cluster.
* Valid values are:
* + **Delete_Log_Group**: Delete the log group, ignore it if it fails, and continue with the subsequent process.
* + **Delete_Master_Log_Stream**: Delete the the log stream, ignore it if it fails, and continue the subsequent process.
* The default option.
* + **Retain**: Skip the deletion process.
*/
ltsReclaimPolicy?: pulumi.Input<string>;
/**
* Specifies the advanced configuration of master nodes.
* The object structure is documented below.
* This parameter and `multiAz` are alternative. Changing this parameter will create a new cluster resource.
*/
masters?: pulumi.Input<pulumi.Input<inputs.Cce.ClusterMaster>[]>;
/**
* Specifies whether to enable multiple AZs for the cluster, only when using HA
* flavors. Changing this parameter will create a new cluster resource. This parameter and `masters` are alternative.
*/
multiAz?: pulumi.Input<boolean>;
/**
* Specifies the component name.
*/
name?: pulumi.Input<string>;
/**
* Specifies the charging period of the CCE cluster.
* If `periodUnit` is set to **month**, the value ranges from 1 to 9.
* If `periodUnit` is set to **year**, the value ranges from 1 to 3.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the CCE cluster.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
* Changing this parameter will create a new cluster resource.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the region in which to create the CCE cluster resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new cluster resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the default worker node security group ID of the cluster.
* If left empty, the system will automatically create a default worker node security group for you.
* The default worker node security group needs to allow access from certain ports to ensure normal communications.
* For details, see [documentation](https://support.huaweicloud.com/intl/en-us/cce_faq/cce_faq_00265.html).
* If updated, the modified security group will only be applied to nodes newly created or accepted.
* For existing nodes, you need to manually modify the security group rules for them.
*/
securityGroupId?: pulumi.Input<string>;
/**
* Specifies the service network segment.
* Changing this parameter will create a new cluster resource.
*/
serviceNetworkCidr?: pulumi.Input<string>;
/**
* Specifies the ID of the subnet used to create the node which should be
* configured with a *DNS address*. Changing this parameter will create a new cluster resource.
*/
subnetId: pulumi.Input<string>;
/**
* Whether Istio is supported in the cluster.
*/
supportIstio?: pulumi.Input<boolean>;
/**
* Specifies the tags of the CCE cluster, key/value pair format.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the ID of the VPC used to create the node.
* Changing this parameter will create a new cluster resource.
*/
vpcId: pulumi.Input<string>;
}