diff --git a/main.tf b/main.tf index be8ee6a..01e8ab8 100644 --- a/main.tf +++ b/main.tf @@ -47,6 +47,8 @@ resource "alicloud_instance" "this" { credit_specification = var.credit_specification != "" ? var.credit_specification : null spot_strategy = var.spot_strategy spot_price_limit = var.spot_price_limit + operator_type = var.operator_type + status = var.status tags = merge( { Name = var.number_of_instances > 1 || var.use_num_suffix ? format("%s%03d", local.name, count.index + 1) : local.name diff --git a/variables.tf b/variables.tf index a67163f..78a2cc4 100644 --- a/variables.tf +++ b/variables.tf @@ -322,4 +322,16 @@ variable "number_of_disks" { description = "(Deprecated) It has been deprecated from version 2.0.0 and use 'data_disks' instead." type = number default = 0 -} \ No newline at end of file +} + +variable "operator_type" { + description = "The operation type. It is valid when `instance_charge_type` is `PrePaid`. Default value: upgrade. Valid values: `upgrade`, `downgrade`. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set `operator_type` to `downgrade`." + type = string + default = "upgrade" +} + +variable "status" { + description = "The instance status. Valid values: `Running`, `Stopped`. You can control the instance start and stop through this parameter. Default to Running." + type = string + default = "Running" +}