Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 13 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

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"
}