Skip to content

alibabacloud-automation/terraform-alicloud-enterprise-clickhouse

Repository files navigation

Terraform module to build ApsaraDB for ClickHouse Enterprise Edition for Alibaba Cloud

terraform-alicloud-enterprise-clickhouse

English | 简体中文

This module is used to create ApsaraDB for ClickHouse Enterprise Edition resources on Alibaba Cloud.

Usage

create a clickhouse enterprise edition cluster.

module "complete" {
  source = "alibabacloud-automation/enterprise-clickhouse/alicloud"

  #alicloud_click_house_enterprise_db_cluster
  create_cluster = true
  scale_max      = "16"
  scale_min      = "8"
  vswitch_id     = "vsw-test"
  vpc_id         = "vpc-test"
  zone_id        = "zone-id-test"
  multi_zones = []

  #alicloud_click_house_enterprise_db_cluster_account
  account_list = [
    {
      account             = "testaccount1"
      account_description = "testaccountdesc1"
      account_type        = "NormalAccount"
      password            = "Tf-testpwd"
      dml_auth_setting = {
        allow_databases    = []
        allow_dictionaries = []
        ddl_authority      = true
        dml_authority      = "0"
      }
    }
  ]

  #alicloud_click_house_enterprise_db_cluster_backup_policy
  preferred_backup_period = "Monday"
  preferred_backup_time   = "04:00Z-05:00Z"
  backup_retention_period = "7"

  #alicloud_click_house_enterprise_db_cluster_security_ip
  security_ip_group_list = [
    {
      group            = "testgroup1"
      security_ip_list = "127.0.0.1"
    }
  ]
}

Examples

Requirements

Name Version
terraform >= 1.3

Providers

Name Version
alicloud n/a

Modules

No modules.

Resources

Name Type
alicloud_click_house_enterprise_db_cluster.cluster resource
alicloud_click_house_enterprise_db_cluster_account.accounts resource
alicloud_click_house_enterprise_db_cluster_backup_policy.backup_policy resource
alicloud_click_house_enterprise_db_cluster_security_ip.security_ip_groups resource

Inputs

Name Description Type Default Required
account_list The account info list for creating several accounts
list(object({
account = string
account_type = string
account_description = string
password = string
dml_auth_setting = object({
allow_databases = list(string)
allow_dictionaries = list(string)
ddl_authority = bool
dml_authority = string
})
}))
[] no
backup_retention_period Backup retention time. string "7" no
create_backup_policy Controls if backup policy should be created bool true no
create_cluster Controls if clickhouse cluster should be created bool true no
db_cluster_id The db cluster id. If create_cluster is set to false, db_cluster_id must be set to be the id of an existing cluster. string null no
multi_zones (Optional) The zone IDs and corresponding vswitch IDs of multi-zone setup.
list(object({
zone_id = string
vswitch_ids = list(string)
}))
[] no
preferred_backup_period Preferred backup period. string "Monday" no
preferred_backup_time Preferred backup time. string "04:00Z-05:00Z" no
scale_max The maximum value of serverless auto scaling. string "16" no
scale_min The minimum value of serverless auto scaling. string "8" no
security_ip_group_list The info list for creating several security ip groups
list(object({
group = string
security_ip_list = string
}))
[] no
vpc_id The VPC ID. string null no
vswitch_id The vSwitch ID. string null no
zone_id The zone ID of EnterpriseDBCluster. string null no

Outputs

Name Description
click_house_enterprise_db_cluster_account_ids The ids of clickhouse cluster enterprise edition accounts.
click_house_enterprise_db_cluster_backup_policy_id The id of clickhouse cluster enterprise edition backup policy.
click_house_enterprise_db_cluster_id The id of clickhouse cluster enterprise edition.
click_house_enterprise_db_cluster_security_ip_ids The ids of clickhouse cluster enterprise edition security ip groups.
click_house_enterprise_db_cluster_status The status of db cluster enterprise edition.

Submit Issues

If you have any problems when using this module, please opening a provider issue and let us know.

Note: There does not recommend opening an issue on this repo.

Authors

Created and maintained by Alibaba Cloud Terraform Team([email protected]).

License

MIT Licensed. See LICENSE for full details.

Reference