forked from alibabacloud-automation/terraform-alicloud-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
278 lines (235 loc) · 9.3 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
#################
# Provider
#################
variable "profile" {
description = "(Deprecated from version 1.3.0)The profile name as set in the shared credentials file. If not set, it will be sourced from the ALICLOUD_PROFILE environment variable."
type = string
default = ""
}
variable "shared_credentials_file" {
description = "(Deprecated from version 1.3.0)This is the path to the shared credentials file. If this is not set and a profile is specified, $HOME/.aliyun/config.json will be used."
type = string
default = ""
}
variable "region" {
description = "(Deprecated from version 1.3.0)The region used to launch this module resources."
type = string
default = ""
}
variable "skip_region_validation" {
description = "(Deprecated from version 1.3.0)Skip static validation of region ID. Used by users of alternative AlibabaCloud-like APIs or users w/ access to regions that are not public (yet)."
type = bool
default = false
}
#################
# Redis instance
#################
variable "create_instance" {
description = "Whether to create Redis instance. If false, you can use a existing Redis instance by setting `existing_instance_id`."
type = bool
default = true
}
variable "engine_version" {
description = "Redis version. Value options can refer to the latest docs [CreateInstance](https://help.aliyun.com/document_detail/60862.html?spm=a2c4g.11186623.6.770.e0c735c10lvrqR) "
type = string
default = ""
}
variable "instance_name" {
description = "Display name of the instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'"
type = string
default = ""
}
variable "instance_class" {
description = "Redis instance type. Refer the Redis instance type reference, such as 'redis.master.small.default', 'redis.master.4xlarge.default', 'redis.sharding.mid.default' etc"
type = string
default = ""
}
variable "availability_zone" {
description = "The available zone to launch Redis instance and other resources."
type = string
default = ""
}
variable "secondary_zone_id" {
description = "The ID of the secondary zone to which you want to migrate the ApsaraDB for Redis instance. If you specify this parameter, the master node and replica node of the instance can be deployed in different zones and disaster recovery is implemented across zones. The instance can withstand failures in data centers."
type = string
default = ""
}
variable "ssl_enable" {
description = "Modifies the SSL status. Valid values: `Disable`, `Enable` and `Update`."
type = string
default = ""
}
variable "security_group_id" {
description = "The ID of security groups. You can specify up to 10 security_group_id. Separate multiple security group IDs with commas (,), such as sg-***,sg-***,sg-***."
type = string
default = ""
}
variable "instance_release_protection" {
description = "Whether to open the release protection."
type = bool
default = false
}
variable "vswitch_id" {
description = "The vswitch id used to launch one or more instances."
type = string
default = ""
}
variable "security_ips" {
description = "List of IP addresses allowed to access all redis of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32])."
type = list(string)
default = []
}
variable "instance_charge_type" {
description = "Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PostPaid."
type = string
default = "PostPaid"
}
variable "period" {
description = "The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36. Default to 1"
type = number
default = 1
}
variable "auto_renew" {
description = "Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false."
type = bool
default = false
}
variable "auto_renew_period" {
description = "Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1."
type = number
default = 1
}
variable "private_ip" {
description = "Set the instance's private IP."
type = string
default = ""
}
variable "instance_backup_id" {
description = "If an instance created based on a backup set generated by another instance is valid, this parameter indicates the ID of the generated backup set"
type = string
default = ""
}
variable "vpc_auth_mode" {
description = "Only meaningful if instance_type is Redis and network type is VPC. Valid values are Close, Open. Defaults to Open. Close means the redis instance can be accessed without authentication. Open means authentication is required."
type = string
default = "Open"
}
variable "password" {
description = "The password of the redis instance."
type = string
default = ""
}
variable "kms_encrypted_password" {
description = "An KMS encrypts password used to an instance. It is conflicted with 'password'."
type = string
default = ""
}
variable "kms_encryption_context" {
description = "An KMS encryption context used to decrypt `kms_encrypted_password` before creating or updating an instance with 'kms_encrypted_password'."
type = map(string)
default = {}
}
variable "maintain_start_time" {
description = "The start time of the operation and maintenance time period of the instance, in the format of HH:mmZ (UTC time)."
type = string
default = "02:00Z"
}
variable "maintain_end_time" {
description = "The end time of the operation and maintenance time period of the instance, in the format of HH:mmZ (UTC time)."
type = string
default = "03:00Z"
}
variable "config" {
description = "The configuration of the KVStore DBInstance."
type = map(string)
default = {}
}
variable "tags" {
description = "A mapping of tags to assign to the redis instance resource."
type = map(string)
default = {}
}
#################
# Redis backup_policy
#################
variable "existing_instance_id" {
description = "The Id of an existing redis instance. If set, the `create_instance` will be ignored."
type = string
default = ""
}
variable "backup_policy_backup_period" {
description = "Redis Instance backup policy backup period."
type = list(string)
default = []
}
variable "backup_policy_backup_time" {
description = "Redis instance backup policy backup time, in the format of HH:mmZ- HH:mmZ."
type = string
default = "02:00Z-03:00Z"
}
#################
# Redis account
#################
variable "create_account" {
description = "Whether to create a new account. If true, the 'accounts' should not be empty."
type = bool
default = true
}
variable "accounts" {
description = "A list mapping used to add multiple accounts. Each item supports keys: account_name, account_password, account_type (default to Normal) and account_privilege (default to RoleReadOnly)."
type = list(map(string))
default = []
}
#############
# cms_alarm
#############
variable "enable_alarm_rule" {
description = "Whether to enable alarm rule. Default to true. "
type = bool
default = true
}
variable "alarm_rule_name" {
description = "The alarm rule name. "
type = string
default = ""
}
variable "alarm_rule_statistics" {
description = "Statistical method. It must be consistent with that defined for metrics. Valid values: ['Average', 'Minimum', 'Maximum']. Default to 'Average'. "
type = string
default = "Average"
}
variable "alarm_rule_operator" {
description = "Alarm comparison operator. Valid values: ['<=', '<', '>', '>=', '==', '!=']. Default to '=='. "
type = string
default = "=="
}
variable "alarm_rule_threshold" {
description = "Alarm threshold value, which must be a numeric value currently. "
type = string
default = ""
}
variable "alarm_rule_triggered_count" {
description = "Number of consecutive times it has been detected that the values exceed the threshold. Default to 3. "
type = number
default = 3
}
variable "alarm_rule_period" {
description = "Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds. "
type = number
default = 300
}
variable "alarm_rule_contact_groups" {
description = "List contact groups of the alarm rule, which must have been created on the console. "
type = list(string)
default = []
}
variable "alarm_rule_silence_time" {
description = "Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400. "
type = number
default = 86400
}
variable "alarm_rule_effective_interval" {
description = "The interval of effecting alarm rule. It foramt as 'hh:mm-hh:mm', like '0:00-4:00'."
type = string
default = "0:00-2:00"
}