» huaweicloud_dms_instance_v1

Manages a DMS instance in the huaweicloud DMS Service.

» Example Usage

» Automatically detect the correct network

resource "huaweicloud_networking_secgroup_v2" "secgroup_1" {
  name = "secgroup_1"
  description = "secgroup_1"
}
data "huaweicloud_dms_az_v1" "az_1" {
}
data "huaweicloud_dms_product_v1" "product_1" {
  engine = "rabbitmq"
  instance_type = "single"
  version = "3.7.0"
}
resource "huaweicloud_dms_instance_v1" "instance_1" {
  name  = "%s"
  engine = "rabbitmq"
  storage_space = "${data.huaweicloud_dms_product_v1.product_1.storage}"
  access_user = "user"
  password = "Dmstest@123"
  vpc_id = "%s"
  security_group_id = "${huaweicloud_networking_secgroup_v2.secgroup_1.id}"
  subnet_id = "%s"
  available_zones = ["${data.huaweicloud_dms_az_v1.az_1.id}"]
  product_id = "${data.huaweicloud_dms_product_v1.product_1.id}"
  engine_version = "${data.huaweicloud_dms_product_v1.product_1.version}"
  depends_on      = ["data.huaweicloud_dms_product_v1.product_1", "huaweicloud_networking_secgroup_v2.secgroup_1"]
}

» Argument Reference

The following arguments are supported:

  • name - (Required) Indicates the name of an instance. An instance name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, and hyphens (-).

  • description - (Optional) Indicates the description of an instance. It is a character string containing not more than 1024 characters.

  • engine - (Optional) Indicates a message engine. Options: rabbitmq and kafka.

  • engine_version - (Optional) Indicates the version of a message engine.

  • specification - (Optional) This parameter is mandatory if the engine is kafka. Indicates the baseline bandwidth of a Kafka instance, that is, the maximum amount of data transferred per unit time. Unit: byte/s. Options: 300 MB, 600 MB, 1200 MB.

  • storage_space - (Required) Indicates the message storage space. Value range: Single-node RabbitMQ instance: 100–90000 GB Cluster RabbitMQ instance: 100 GB x Number of nodes to 90000 GB, 200 GB x Number of nodes to 90000 GB, 300 GB x Number of nodes to 90000 GB Kafka instance with specification being 300 MB: 1200–90000 GB Kafka instance with specification being 600 MB: 2400–90000 GB Kafka instance with specification being 1200 MB: 4800–90000 GB

  • partition_num - (Optional) This parameter is mandatory when a Kafka instance is created. Indicates the maximum number of topics in a Kafka instance. When specification is 300 MB: 900 When specification is 600 MB: 1800 When specification is 1200 MB: 1800

  • access_user - (Optional) Indicates a username. If the engine is rabbitmq, this parameter is mandatory. If the engine is kafka, this parameter is optional. A username consists of 4 to 64 characters and supports only letters, digits, and hyphens (-).

  • password - (Optional) If the engine is rabbitmq, this parameter is mandatory. If the engine is kafka, this parameter is mandatory when ssl_enable is true and is invalid when ssl_enable is false. Indicates the password of an instance. An instance password must meet the following complexity requirements: Must be 8 to 32 characters long. Must contain at least 2 of the following character types: lowercase letters, uppercase letters, digits, and special characters (`~!@#$%&*()-_=+|[{}]:'",<.>/?).

  • vpc_id - (Required) Indicates the ID of a VPC.

  • security_group_id - (Required) Indicates the ID of a security group.

  • subnet_id - (Required) Indicates the ID of a subnet.

  • available_zones - (Required) Indicates the ID of an AZ. The parameter value can not be left blank or an empty array. For details, see section Querying AZ Information.

  • product_id - (Required) Indicates a product ID.

  • maintain_begin - (Optional) Indicates the time at which a maintenance time window starts. Format: HH:mm:ss. The start time and end time of a maintenance time window must indicate the time segment of a supported maintenance time window. For details, see section Querying Maintenance Time Windows. The start time must be set to 22:00, 02:00, 06:00, 10:00, 14:00, or 18:00. Parameters maintain_begin and maintain_end must be set in pairs. If parameter maintain_begin is left blank, parameter maintain_end is also blank. In this case, the system automatically allocates the default start time 02:00.

  • maintain_end - (Optional) Indicates the time at which a maintenance time window ends. Format: HH:mm:ss. The start time and end time of a maintenance time window must indicate the time segment of a supported maintenance time window. For details, see section Querying Maintenance Time Windows. The end time is four hours later than the start time. For example, if the start time is 22:00, the end time is 02:00. Parameters maintain_begin and maintain_end must be set in pairs. If parameter maintain_end is left blank, parameter maintain_begin is also blank. In this case, the system automatically allocates the default end time 06:00.

  • enable_publicip - (Optional) Indicates whether to enable public access to a RabbitMQ instance. true: enable, false: disable

  • publicip_id - (Optional) Indicates the ID of the elastic IP address (EIP) bound to a RabbitMQ instance. This parameter is mandatory if public access is enabled (that is, enable_publicip is set to true).

  • storage_spec_code - (Optional) Indicates the storage I/O specification. For details on how to select a disk type, see Disk Types and Disk Performance. Options for a RabbitMQ instance: dms.physical.storage.normal dms.physical.storage.high dms.physical.storage.ultra Options for a Kafka instance: When specification is 300 MB: dms.physical.storage.high or dms.physical.storage.ultra When specification is 600 MB: dms.physical.storage.ultra When specification is 1200 MB: dms.physical.storage.ultra

» Attributes Reference

The following attributes are exported: