-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
158 lines (132 loc) · 4.21 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
variable "availability_zone" {
description = "The available zone for the instance. "
type = string
default = "ap-guangzhou-2"
}
# vpc
variable "vpc_cidr_block" {
description = "The CIDR block for the VPC."
type = string
default = "10.0.0.0/16"
}
variable "vpc_name" {
description = "The name of the VPC."
type = string
default = "cdb_app_vpc"
}
variable "subnet_cidr_block" {
description = "The CIDR block for the subnet."
type = string
default = "10.0.0.0/24"
}
variable "subnet_name" {
description = "The name of the VPC."
type = string
default = "cdb_app_subnet"
}
variable "availability_zone" {
description = "The subnet availability zone."
type = string
default = "ap-guangzhou-2"
}
# 安全组
variable "sg_name" {
description = "The name of the security group."
type = string
default = "sg_name"
}
variable "sg_description" {
description = "The description of the security group."
type = string
default = "sg_description"
}
# cvm
variable "instance_name" {
description = "the name of instance to create."
type = string
default = "crp-cvm"
}
variable "image_id" {
description = "The image to use for the instance. Changing image_id will cause the instance reset."
type = string
default = "img-l8og963d"
}
variable "instance_type" {
description = "instance type of instance."
type = string
default = "S5.MEDIUM4"
}
variable "password" {
description = "Login password of the instance. For Linux instances, the password must include 8-30 characters, and contain at least two of the following character sets: [a-z], [A-Z], [0-9] and [()`~!@#$%^&*-+="
type = string
default = "Password@123"
}
variable "allocate_public_ip" {
type = string
description = "Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false."
}
variable "internet_max_bandwidth_out" {
type = number
description = "Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when `allocate_public_ip` is false."
}
variable "system_disk_type" {
description = "System disk type. For more information on limits of system disk types, see Storage Overview. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, CLOUD_SSD: SSD, CLOUD_PREMIUM: Premium Cloud"
type = string
default = "CLOUD_PREMIUM"
}
variable "system_disk_size" {
type = number
description = "Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop."
default = 50
}
variable "data_disk_type" {
description = "Data disk type. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, LOCAL_NVME: local NVME disk, specified in the InstanceType, LOCAL_PRO: local HDD disk, specified in the InstanceType, CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD, CLOUD_BSSD: Balanced SSD."
type = string
default = "CLOUD_PREMIUM"
}
variable "data_disk_size" {
type = number
description = "Size of the data disk, and unit is GB."
default = 50
}
variable "tags" {
description = "A mapping of tags to assign to the resource."
type = map(string)
default = {}
}
# mysql
variable "mysql_instance_name" {
description = "The name of the mysql instance."
type = string
default = "crp-mysql"
}
variable "mysql_instance_region" {
description = "The regioni of the mysql instance."
type = string
default = "ap-guangzhou"
}
variable "mysql_instance_password" {
description = "The password of the mysql instance."
type = string
default = "Password@123"
}
variable "mem_size" {
description = "Memory size (in MB)."
type = number
default = 8000
}
variable "volume_size" {
description = "Disk size (in GB)."
type = number
default = 200
}
variable "cpu" {
description = "Cpu cores."
type = number
default = 4
}
variable "device_type" {
description = "Device type."
type = string
default = "UNIVERSAL"
}