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
26 changes: 15 additions & 11 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ module "instances" {
source = "alibaba/ecs-instance/alicloud"
version = "2.12.0"

number_of_instances = var.create_instance ? var.number_of_instance : 0
image_id = var.image_id
instance_type = var.instance_type
use_num_suffix = var.use_num_suffix
security_group_ids = var.security_groups
vswitch_id = var.vswitch_id
user_data = local.user_data
password = var.instance_password
associate_public_ip_address = var.associate_public_ip_address
internet_max_bandwidth_out = var.internet_max_bandwidth_out
tags = var.tags
number_of_instances = var.create_instance ? var.number_of_instance : 0
image_id = var.image_id
instance_type = var.instance_type
internet_charge_type = var.internet_charge_type
system_disk_category = var.system_disk_category
system_disk_size = var.system_disk_size
system_disk_performance_level = var.system_disk_performance_level
use_num_suffix = var.use_num_suffix
security_group_ids = var.security_groups
vswitch_id = var.vswitch_id
user_data = local.user_data
password = var.instance_password
associate_public_ip_address = var.associate_public_ip_address
internet_max_bandwidth_out = var.internet_max_bandwidth_out
tags = var.tags
}

resource "alicloud_log_machine_group" "this" {
Expand Down
26 changes: 25 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,30 @@ variable "instance_type" {
default = ""
}

variable "system_disk_category" {
description = "The system disk category used to launch one or more ecs instances."
type = string
default = null
}

variable "system_disk_size" {
description = "The system disk size used to launch one or more ecs instances."
type = number
default = null
}

variable "system_disk_performance_level" {
description = "The performance level of the ESSD used as the system disk, Valid values: `PL0`, `PL1`, `PL2`, `PL3`, Default to `PL1`."
type = string
default = null
}

variable "internet_charge_type" {
description = "The internet charge type of instance. Choices are 'PayByTraffic' and 'PayByBandwidth'."
type = string
default = null
}

variable "use_num_suffix" {
description = "Always append numerical suffix(like 001, 002 and so on) to instance name and host name, even if number_of_instances is 1."
type = bool
Expand Down Expand Up @@ -138,4 +162,4 @@ variable "log_machine_identify_type" {
description = "The machine identification type, including IP and user-defined identity. Valid values are 'ip' and 'userdefined'. Default to 'ip'."
type = string
default = "ip"
}
}
Loading