Skip to content

Commit ceeb804

Browse files
committed
feat: support attribute system_disk_category, system_disk_size, system_disk_performance_level and internet_charge_type
1 parent 7169e09 commit ceeb804

File tree

2 files changed

+40
-12
lines changed

2 files changed

+40
-12
lines changed

main.tf

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@ module "instances" {
33
source = "alibaba/ecs-instance/alicloud"
44
version = "2.12.0"
55

6-
number_of_instances = var.create_instance ? var.number_of_instance : 0
7-
image_id = var.image_id
8-
instance_type = var.instance_type
9-
use_num_suffix = var.use_num_suffix
10-
security_group_ids = var.security_groups
11-
vswitch_id = var.vswitch_id
12-
user_data = local.user_data
13-
password = var.instance_password
14-
associate_public_ip_address = var.associate_public_ip_address
15-
internet_max_bandwidth_out = var.internet_max_bandwidth_out
16-
tags = var.tags
6+
number_of_instances = var.create_instance ? var.number_of_instance : 0
7+
image_id = var.image_id
8+
instance_type = var.instance_type
9+
internet_charge_type = var.internet_charge_type
10+
system_disk_category = var.system_disk_category
11+
system_disk_size = var.system_disk_size
12+
system_disk_performance_level = var.system_disk_performance_level
13+
use_num_suffix = var.use_num_suffix
14+
security_group_ids = var.security_groups
15+
vswitch_id = var.vswitch_id
16+
user_data = local.user_data
17+
password = var.instance_password
18+
associate_public_ip_address = var.associate_public_ip_address
19+
internet_max_bandwidth_out = var.internet_max_bandwidth_out
20+
tags = var.tags
1721
}
1822

1923
resource "alicloud_log_machine_group" "this" {

variables.tf

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,30 @@ variable "instance_type" {
2424
default = ""
2525
}
2626

27+
variable "system_disk_category" {
28+
description = "The system disk category used to launch one or more ecs instances."
29+
type = string
30+
default = null
31+
}
32+
33+
variable "system_disk_size" {
34+
description = "The system disk size used to launch one or more ecs instances."
35+
type = number
36+
default = null
37+
}
38+
39+
variable "system_disk_performance_level" {
40+
description = "The performance level of the ESSD used as the system disk, Valid values: `PL0`, `PL1`, `PL2`, `PL3`, Default to `PL1`."
41+
type = string
42+
default = null
43+
}
44+
45+
variable "internet_charge_type" {
46+
description = "The internet charge type of instance. Choices are 'PayByTraffic' and 'PayByBandwidth'."
47+
type = string
48+
default = null
49+
}
50+
2751
variable "use_num_suffix" {
2852
description = "Always append numerical suffix(like 001, 002 and so on) to instance name and host name, even if number_of_instances is 1."
2953
type = bool
@@ -138,4 +162,4 @@ variable "log_machine_identify_type" {
138162
description = "The machine identification type, including IP and user-defined identity. Valid values are 'ip' and 'userdefined'. Default to 'ip'."
139163
type = string
140164
default = "ip"
141-
}
165+
}

0 commit comments

Comments
 (0)