@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
676 lines (675 loc) • 25.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Manages CSS cluster resource within HuaweiCloud
*
* ## Example Usage
* ### create a cluster
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const availabilityZone = config.requireObject("availabilityZone");
* const vpcId = config.requireObject("vpcId");
* const subnetId = config.requireObject("subnetId");
* const secgroupId = config.requireObject("secgroupId");
* const cluster = new huaweicloud.css.Cluster("cluster", {
* engineVersion: "7.10.2",
* essNodeConfig: {
* flavor: "ess.spec-4u8g",
* instanceNumber: 1,
* volume: {
* volumeType: "HIGH",
* size: 40,
* },
* },
* availabilityZone: availabilityZone,
* vpcId: vpcId,
* subnetId: subnetId,
* securityGroupId: secgroupId,
* });
* ```
* ### create a cluster with ess-data node and master node
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const availabilityZone = config.requireObject("availabilityZone");
* const vpcId = config.requireObject("vpcId");
* const subnetId = config.requireObject("subnetId");
* const secgroupId = config.requireObject("secgroupId");
* const cluster = new huaweicloud.css.Cluster("cluster", {
* engineVersion: "7.10.2",
* essNodeConfig: {
* flavor: "ess.spec-4u8g",
* instanceNumber: 1,
* volume: {
* volumeType: "HIGH",
* size: 40,
* },
* },
* masterNodeConfig: {
* flavor: "ess.spec-4u8g",
* instanceNumber: 3,
* volume: {
* volumeType: "HIGH",
* size: 40,
* },
* },
* availabilityZone: availabilityZone,
* vpcId: vpcId,
* subnetId: subnetId,
* securityGroupId: secgroupId,
* });
* ```
* ### create a cluster with ess-data node and cold node use local disk
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const availabilityZone = config.requireObject("availabilityZone");
* const vpcId = config.requireObject("vpcId");
* const subnetId = config.requireObject("subnetId");
* const secgroupId = config.requireObject("secgroupId");
* const cluster = new huaweicloud.css.Cluster("cluster", {
* engineVersion: "7.10.2",
* essNodeConfig: {
* flavor: "ess.spec-ds.xlarge.8",
* instanceNumber: 1,
* },
* coldNodeConfig: {
* flavor: "ess.spec-ds.2xlarge.8",
* instanceNumber: 2,
* },
* availabilityZone: availabilityZone,
* vpcId: vpcId,
* subnetId: subnetId,
* securityGroupId: secgroupId,
* });
* ```
*
* ## Import
*
* The CSS cluster can be imported by `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Css/cluster:Cluster test <id>
* ```
*/
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 whether auto renew is enabled.
* The valid values are **true** and **false**, defaults to **false**.
*/
readonly autoRenew: pulumi.Output<string | undefined>;
/**
* Specifies the availability zone name.
* Separate multiple AZs with commas (,), for example, az1,az2. AZs must be unique. The number of nodes must be greater
* than or equal to the number of AZs. If the number of nodes is a multiple of the number of AZs, the nodes are evenly
* distributed to each AZ. If the number of nodes is not a multiple of the number of AZs, the absolute difference
* between node quantity in any two AZs is **1** at most.
*/
readonly availabilityZone: pulumi.Output<string>;
/**
* Whether the snapshot function is enabled.
*/
readonly backupAvailable: pulumi.Output<boolean>;
/**
* Specifies the advanced backup policy. Structure is documented below.
*/
readonly backupStrategy: pulumi.Output<outputs.Css.ClusterBackupStrategy | undefined>;
/**
* The resource ID of bandwidth.
*/
readonly bandwidthResourceId: pulumi.Output<string>;
/**
* Specifies the charging mode of the cluster.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
*/
readonly chargingMode: pulumi.Output<string>;
/**
* Specifies the config of client node.
* The clientNodeConfig structure is documented below.
*/
readonly clientNodeConfig: pulumi.Output<outputs.Css.ClusterClientNodeConfig | undefined>;
/**
* Specifies the config of cold data node.
* The coldNodeConfig structure is documented below.
*/
readonly coldNodeConfig: pulumi.Output<outputs.Css.ClusterColdNodeConfig | undefined>;
/**
* schema: Deprecated; use created_at instead
*/
readonly created: pulumi.Output<string>;
/**
* Time when a cluster is created. The format is ISO8601: CCYY-MM-DDThh:mm:ss.
*/
readonly createdAt: pulumi.Output<string>;
/**
* Whether disks are encrypted.
*/
readonly diskEncrypted: pulumi.Output<boolean>;
readonly enableForceNew: pulumi.Output<string | undefined>;
/**
* The IP address and port number.
*/
readonly endpoint: pulumi.Output<string>;
/**
* Specifies the engine type. The valid value can be **elasticsearch** or **opensearch**.
* Defaults to **elasticsearch**. Changing this parameter will create a new resource.
*/
readonly engineType: pulumi.Output<string | undefined>;
/**
* Specifies the engine version.
* For details, see [Supported Cluster Versions](https://support.huaweicloud.com/intl/en-us/api-css/css_03_0056.html).
*/
readonly engineVersion: pulumi.Output<string>;
/**
* Specifies the enterprise project id of the css cluster, The value **0**
* indicates the default enterprise project.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* Specifies the config of data node.
* The essNodeConfig structure is documented below.
*/
readonly essNodeConfig: pulumi.Output<outputs.Css.ClusterEssNodeConfig>;
/**
* @deprecated please use ess_node_config.instance_number instead
*/
readonly expectNodeNum: pulumi.Output<number>;
/**
* Specifies whether to enable HTTPS. Defaults to **false**.
* When `httpsEnabled` is set to **true**, the `securityMode` needs to be set to **true**.
* Changing this parameter will create a new resource.
*/
readonly httpsEnabled: pulumi.Output<boolean>;
/**
* Whether a cluster is billed on the yearly/monthly mode.
*/
readonly isPeriod: pulumi.Output<boolean>;
/**
* Specifies Kibana public network access information.
* This parameter is valid only when securityMode is set to **true**.
* The kibanaPublicAccess structure is documented below.
*/
readonly kibanaPublicAccess: pulumi.Output<outputs.Css.ClusterKibanaPublicAccess | undefined>;
/**
* Specifies the config of master node.
* The masterNodeConfig structure is documented below.
*/
readonly masterNodeConfig: pulumi.Output<outputs.Css.ClusterMasterNodeConfig | undefined>;
/**
* Specifies the cluster name. It contains `4` to `32` characters.
* Only letters, digits, hyphens (-), and underscores (_) are allowed. The value must start with a letter.
* Changing this parameter will create a new resource.
*/
readonly name: pulumi.Output<string>;
/**
* @deprecated please use ess_node_config instead
*/
readonly nodeConfig: pulumi.Output<outputs.Css.ClusterNodeConfig>;
/**
* List of node objects.
* The nodes structure is documented below.
*/
readonly nodes: pulumi.Output<outputs.Css.ClusterNode[]>;
/**
* Specifies the password of the cluster administrator in security mode.
* This parameter is mandatory only when `securityMode` is set to true.
* The administrator password must meet the following requirements:
* + The password can contain 8 to 32 characters.
* + The password must contain at least 3 of the following character types: uppercase letters, lowercase letters, digits,
* and special characters (~!@#$%^&*()-_=+\\|[{}];:,<.>/?).
*/
readonly password: pulumi.Output<string | undefined>;
/**
* Specifies the charging period of the instance.
* 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 `9`.
*/
readonly period: pulumi.Output<number | undefined>;
/**
* Specifies the charging period unit of the instance.
* Valid values are **month** and **year**.
*/
readonly periodUnit: pulumi.Output<string | undefined>;
/**
* Specifies the public network access information.
* The publicAccess structure is documented below.
*/
readonly publicAccess: pulumi.Output<outputs.Css.ClusterPublicAccess | undefined>;
/**
* Specifies the region in which to create the cluster resource. If omitted, the
* provider-level region will be used. Changing this creates a new cluster resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the security group ID.
*/
readonly securityGroupId: pulumi.Output<string>;
/**
* Specifies whether to enable authentication.
* The value can be **true** or **false**. Authentication is disabled by default.
* + **true:** Authentication is enabled for the cluster.
* + **false:** Authentication is disabled for the cluster.
*/
readonly securityMode: pulumi.Output<boolean | undefined>;
/**
* Instance status.
*/
readonly status: pulumi.Output<string>;
/**
* Specifies the Subnet ID.
* Changing this parameter will create a new resource.
*/
readonly subnetId: pulumi.Output<string>;
/**
* The key/value pairs to associate with the cluster.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Time when a cluster is updated. The format is ISO8601: CCYY-MM-DDThh:mm:ss.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Specifies the VPC ID.
* Changing this parameter will create a new resource.
*/
readonly vpcId: pulumi.Output<string>;
/**
* Specifies the VPC endpoint service information.
* The vpcepEndpoint structure is documented below.
*/
readonly vpcepEndpoint: pulumi.Output<outputs.Css.ClusterVpcepEndpoint | undefined>;
/**
* The VPC endpoint service ID.
*/
readonly vpcepEndpointId: pulumi.Output<string>;
/**
* The private IP address of VPC endpoint service.
*/
readonly vpcepIp: 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 whether auto renew is enabled.
* The valid values are **true** and **false**, defaults to **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the availability zone name.
* Separate multiple AZs with commas (,), for example, az1,az2. AZs must be unique. The number of nodes must be greater
* than or equal to the number of AZs. If the number of nodes is a multiple of the number of AZs, the nodes are evenly
* distributed to each AZ. If the number of nodes is not a multiple of the number of AZs, the absolute difference
* between node quantity in any two AZs is **1** at most.
*/
availabilityZone?: pulumi.Input<string>;
/**
* Whether the snapshot function is enabled.
*/
backupAvailable?: pulumi.Input<boolean>;
/**
* Specifies the advanced backup policy. Structure is documented below.
*/
backupStrategy?: pulumi.Input<inputs.Css.ClusterBackupStrategy>;
/**
* The resource ID of bandwidth.
*/
bandwidthResourceId?: pulumi.Input<string>;
/**
* Specifies the charging mode of the cluster.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the config of client node.
* The clientNodeConfig structure is documented below.
*/
clientNodeConfig?: pulumi.Input<inputs.Css.ClusterClientNodeConfig>;
/**
* Specifies the config of cold data node.
* The coldNodeConfig structure is documented below.
*/
coldNodeConfig?: pulumi.Input<inputs.Css.ClusterColdNodeConfig>;
/**
* schema: Deprecated; use created_at instead
*/
created?: pulumi.Input<string>;
/**
* Time when a cluster is created. The format is ISO8601: CCYY-MM-DDThh:mm:ss.
*/
createdAt?: pulumi.Input<string>;
/**
* Whether disks are encrypted.
*/
diskEncrypted?: pulumi.Input<boolean>;
enableForceNew?: pulumi.Input<string>;
/**
* The IP address and port number.
*/
endpoint?: pulumi.Input<string>;
/**
* Specifies the engine type. The valid value can be **elasticsearch** or **opensearch**.
* Defaults to **elasticsearch**. Changing this parameter will create a new resource.
*/
engineType?: pulumi.Input<string>;
/**
* Specifies the engine version.
* For details, see [Supported Cluster Versions](https://support.huaweicloud.com/intl/en-us/api-css/css_03_0056.html).
*/
engineVersion?: pulumi.Input<string>;
/**
* Specifies the enterprise project id of the css cluster, The value **0**
* indicates the default enterprise project.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies the config of data node.
* The essNodeConfig structure is documented below.
*/
essNodeConfig?: pulumi.Input<inputs.Css.ClusterEssNodeConfig>;
/**
* @deprecated please use ess_node_config.instance_number instead
*/
expectNodeNum?: pulumi.Input<number>;
/**
* Specifies whether to enable HTTPS. Defaults to **false**.
* When `httpsEnabled` is set to **true**, the `securityMode` needs to be set to **true**.
* Changing this parameter will create a new resource.
*/
httpsEnabled?: pulumi.Input<boolean>;
/**
* Whether a cluster is billed on the yearly/monthly mode.
*/
isPeriod?: pulumi.Input<boolean>;
/**
* Specifies Kibana public network access information.
* This parameter is valid only when securityMode is set to **true**.
* The kibanaPublicAccess structure is documented below.
*/
kibanaPublicAccess?: pulumi.Input<inputs.Css.ClusterKibanaPublicAccess>;
/**
* Specifies the config of master node.
* The masterNodeConfig structure is documented below.
*/
masterNodeConfig?: pulumi.Input<inputs.Css.ClusterMasterNodeConfig>;
/**
* Specifies the cluster name. It contains `4` to `32` characters.
* Only letters, digits, hyphens (-), and underscores (_) are allowed. The value must start with a letter.
* Changing this parameter will create a new resource.
*/
name?: pulumi.Input<string>;
/**
* @deprecated please use ess_node_config instead
*/
nodeConfig?: pulumi.Input<inputs.Css.ClusterNodeConfig>;
/**
* List of node objects.
* The nodes structure is documented below.
*/
nodes?: pulumi.Input<pulumi.Input<inputs.Css.ClusterNode>[]>;
/**
* Specifies the password of the cluster administrator in security mode.
* This parameter is mandatory only when `securityMode` is set to true.
* The administrator password must meet the following requirements:
* + The password can contain 8 to 32 characters.
* + The password must contain at least 3 of the following character types: uppercase letters, lowercase letters, digits,
* and special characters (~!@#$%^&*()-_=+\\|[{}];:,<.>/?).
*/
password?: pulumi.Input<string>;
/**
* Specifies the charging period of the instance.
* 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 `9`.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the instance.
* Valid values are **month** and **year**.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the public network access information.
* The publicAccess structure is documented below.
*/
publicAccess?: pulumi.Input<inputs.Css.ClusterPublicAccess>;
/**
* Specifies the region in which to create the cluster resource. If omitted, the
* provider-level region will be used. Changing this creates a new cluster resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the security group ID.
*/
securityGroupId?: pulumi.Input<string>;
/**
* Specifies whether to enable authentication.
* The value can be **true** or **false**. Authentication is disabled by default.
* + **true:** Authentication is enabled for the cluster.
* + **false:** Authentication is disabled for the cluster.
*/
securityMode?: pulumi.Input<boolean>;
/**
* Instance status.
*/
status?: pulumi.Input<string>;
/**
* Specifies the Subnet ID.
* Changing this parameter will create a new resource.
*/
subnetId?: pulumi.Input<string>;
/**
* The key/value pairs to associate with the cluster.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Time when a cluster is updated. The format is ISO8601: CCYY-MM-DDThh:mm:ss.
*/
updatedAt?: pulumi.Input<string>;
/**
* Specifies the VPC ID.
* Changing this parameter will create a new resource.
*/
vpcId?: pulumi.Input<string>;
/**
* Specifies the VPC endpoint service information.
* The vpcepEndpoint structure is documented below.
*/
vpcepEndpoint?: pulumi.Input<inputs.Css.ClusterVpcepEndpoint>;
/**
* The VPC endpoint service ID.
*/
vpcepEndpointId?: pulumi.Input<string>;
/**
* The private IP address of VPC endpoint service.
*/
vpcepIp?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Cluster resource.
*/
export interface ClusterArgs {
/**
* Specifies whether auto renew is enabled.
* The valid values are **true** and **false**, defaults to **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the availability zone name.
* Separate multiple AZs with commas (,), for example, az1,az2. AZs must be unique. The number of nodes must be greater
* than or equal to the number of AZs. If the number of nodes is a multiple of the number of AZs, the nodes are evenly
* distributed to each AZ. If the number of nodes is not a multiple of the number of AZs, the absolute difference
* between node quantity in any two AZs is **1** at most.
*/
availabilityZone?: pulumi.Input<string>;
/**
* Specifies the advanced backup policy. Structure is documented below.
*/
backupStrategy?: pulumi.Input<inputs.Css.ClusterBackupStrategy>;
/**
* Specifies the charging mode of the cluster.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the config of client node.
* The clientNodeConfig structure is documented below.
*/
clientNodeConfig?: pulumi.Input<inputs.Css.ClusterClientNodeConfig>;
/**
* Specifies the config of cold data node.
* The coldNodeConfig structure is documented below.
*/
coldNodeConfig?: pulumi.Input<inputs.Css.ClusterColdNodeConfig>;
enableForceNew?: pulumi.Input<string>;
/**
* Specifies the engine type. The valid value can be **elasticsearch** or **opensearch**.
* Defaults to **elasticsearch**. Changing this parameter will create a new resource.
*/
engineType?: pulumi.Input<string>;
/**
* Specifies the engine version.
* For details, see [Supported Cluster Versions](https://support.huaweicloud.com/intl/en-us/api-css/css_03_0056.html).
*/
engineVersion: pulumi.Input<string>;
/**
* Specifies the enterprise project id of the css cluster, The value **0**
* indicates the default enterprise project.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies the config of data node.
* The essNodeConfig structure is documented below.
*/
essNodeConfig?: pulumi.Input<inputs.Css.ClusterEssNodeConfig>;
/**
* @deprecated please use ess_node_config.instance_number instead
*/
expectNodeNum?: pulumi.Input<number>;
/**
* Specifies whether to enable HTTPS. Defaults to **false**.
* When `httpsEnabled` is set to **true**, the `securityMode` needs to be set to **true**.
* Changing this parameter will create a new resource.
*/
httpsEnabled?: pulumi.Input<boolean>;
/**
* Specifies Kibana public network access information.
* This parameter is valid only when securityMode is set to **true**.
* The kibanaPublicAccess structure is documented below.
*/
kibanaPublicAccess?: pulumi.Input<inputs.Css.ClusterKibanaPublicAccess>;
/**
* Specifies the config of master node.
* The masterNodeConfig structure is documented below.
*/
masterNodeConfig?: pulumi.Input<inputs.Css.ClusterMasterNodeConfig>;
/**
* Specifies the cluster name. It contains `4` to `32` characters.
* Only letters, digits, hyphens (-), and underscores (_) are allowed. The value must start with a letter.
* Changing this parameter will create a new resource.
*/
name?: pulumi.Input<string>;
/**
* @deprecated please use ess_node_config instead
*/
nodeConfig?: pulumi.Input<inputs.Css.ClusterNodeConfig>;
/**
* Specifies the password of the cluster administrator in security mode.
* This parameter is mandatory only when `securityMode` is set to true.
* The administrator password must meet the following requirements:
* + The password can contain 8 to 32 characters.
* + The password must contain at least 3 of the following character types: uppercase letters, lowercase letters, digits,
* and special characters (~!@#$%^&*()-_=+\\|[{}];:,<.>/?).
*/
password?: pulumi.Input<string>;
/**
* Specifies the charging period of the instance.
* 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 `9`.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the instance.
* Valid values are **month** and **year**.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the public network access information.
* The publicAccess structure is documented below.
*/
publicAccess?: pulumi.Input<inputs.Css.ClusterPublicAccess>;
/**
* Specifies the region in which to create the cluster resource. If omitted, the
* provider-level region will be used. Changing this creates a new cluster resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the security group ID.
*/
securityGroupId?: pulumi.Input<string>;
/**
* Specifies whether to enable authentication.
* The value can be **true** or **false**. Authentication is disabled by default.
* + **true:** Authentication is enabled for the cluster.
* + **false:** Authentication is disabled for the cluster.
*/
securityMode?: pulumi.Input<boolean>;
/**
* Specifies the Subnet ID.
* Changing this parameter will create a new resource.
*/
subnetId?: pulumi.Input<string>;
/**
* The key/value pairs to associate with the cluster.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the VPC ID.
* Changing this parameter will create a new resource.
*/
vpcId?: pulumi.Input<string>;
/**
* Specifies the VPC endpoint service information.
* The vpcepEndpoint structure is documented below.
*/
vpcepEndpoint?: pulumi.Input<inputs.Css.ClusterVpcepEndpoint>;
}