-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
377 lines (335 loc) · 10.7 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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
##############################################################################################
#Create resources
variable "create" {
type = bool
default = true
description = "Create the resource?"
}
variable "create_cache" {
type = bool
default = false
description = "Create the elasticache Redis?"
}
variable "create_elasticache_serverless" {
type = bool
default = false
description = "Create the elasticache Redis serverless?"
}
variable "create_elasticache_replication_group" {
type = bool
default = false
description = "Create the replication group?"
}
variable "create_elasticache_parameter_group" {
type = bool
default = false
description = "Create the parameter group?"
}
variable "create_elasticache_subnet_group" {
type = bool
default = false
description = "Create the subnet group?"
}
variable "create_elasticache_user" {
type = bool
default = false
description = "Create the user?"
}
variable "create_elasticache_user_group" {
type = bool
default = false
description = "Create the user group?"
}
variable "create_cache_password" {
type = bool
default = false
description = "Create the password?"
}
##############################################################################################
#Redis serverless
variable "serverless_name" {
type = string
default = null
description = "Name Redis Serverless. This parameter is stored as a lowercase string."
}
variable "daily_snapshot_time" {
type = string
default = "03:00"
description = " The daily time that snapshots will be created from the new serverless cache.(Only for the serverless module)"
}
variable "snapshot_arns_to_restore" {
type = list(string)
default = null
description = "The list of ARN(s) of the snapshot that the new serverless cache will be created from(Only for the serverless module)"
}
variable "cache_usage_limits" {
type = any
default = {}
description = "Sets the cache usage limits for storage and ElastiCache Processing Units for the cache.(data_storage,ecpu_per_second)"
}
variable "enabled_limits" {
type = bool
default = false
description = "Enable customization of cache_usage_limits(Only for the serverless module)"
}
variable "major_engine_version" {
type = string
default = "7"
description = "The version of the cache engine that will be used to create the serverless cache.(Only for the serverless module)"
}
variable "description_serverless" {
type = string
default = ""
description = "User-created description for the serverless. Must not be empty"
}
##############################################################################################
#Replication Group
variable "engine" {
type = string
default = "redis"
description = "Name of the cache engine to be used for the clusters in this replication group."
}
variable "replication_group_id" {
type = string
default = null
description = "Replication group identifier. This parameter is stored as a lowercase string."
}
variable "preferred_cache_cluster_azs" {
type = list(string)
default = null
description = "List of EC2 availability zones in which the replication group's cache clusters will be created."
}
variable "automatic_failover_enabled" {
type = bool
default = true
description = "Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails."
}
variable "node_type" {
type = string
default = null
description = "Instance class to be used."
}
variable "num_cache_clusters" {
type = number
default = 3
description = "Number of cache clusters (primary and replicas) this replication group will have."
}
variable "engine_version" {
type = string
default = "6.x"
description = "Version number of the cache engine to be used for the cache clusters in this replication group."
}
variable "port" {
type = number
default = 6379
description = "Port number on which each of the cache nodes will accept connections."
}
variable "apply_immediately" {
type = bool
default = false
description = "Specifies whether any modifications are applied immediately, or during the next maintenance window."
}
variable "at_rest_encryption_enabled" {
type = bool
default = true
description = "Whether to enable encryption at rest."
}
variable "auth_token" {
type = string
default = null
description = "Password used to access a password protected server"
}
variable "auto_minor_version_upgrade" {
type = bool
default = false
description = "Specifies whether minor version engine upgrades will be applied automatically to the underlying"
}
variable "data_tiering_enabled" {
type = bool
default = false
description = "Enables data tiering"
}
variable "final_snapshot_identifier" {
type = string
default = null
description = "The name of your final node group (shard) snapshot."
}
variable "global_replication_group_id" {
type = string
default = null
description = "The ID of the global replication group to which this replication group should belong."
}
variable "kms_key_id" {
type = string
default = null
description = "The ARN of the key that you wish to use if encrypting at rest."
}
variable "maintenance_window" {
type = string
default = "sat:03:00-sat:06:00"
description = "Specifies the weekly time range for when maintenance on the cache cluster is performed."
}
variable "multi_az_enabled" {
type = bool
default = false
description = "Specifies whether to enable Multi-AZ Support for the replication group."
}
variable "notification_topic_arn" {
type = string
default = null
description = "ARN of an SNS topic to send ElastiCache notifications to"
}
variable "num_node_groups" {
type = number
default = null
description = "Number of node groups (shards) for this Redis replication group."
}
variable "replicas_per_node_group" {
type = number
default = null
description = "Number of replica nodes in each node group."
}
variable "security_group_ids" {
type = list(string)
default = []
description = "One or more Amazon VPC security groups associated with this replication group."
}
variable "security_group_names" {
type = list(string)
default = null
description = "List of cache security group names to associate with this replication group."
}
variable "snapshot_retention_limit" {
type = number
default = 7
description = "Number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them."
}
variable "snapshot_window" {
type = string
default = "00:00-02:00"
description = "Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster."
}
variable "snapshot_name" {
type = string
default = null
description = "Name of a snapshot from which to restore data into the new node group."
}
variable "transit_encryption_enabled" {
type = bool
default = true
description = "Whether to enable encryption in transit."
}
variable "user_group_ids" {
type = list(string)
default = null
description = "User Group ID to associate with the replication group."
}
variable "description_redis" {
type = string
default = ""
description = "User-created description for the replication group. Must not be empty"
}
variable "log_delivery_configuration" {
type = list(map(string))
default = []
description = "block allows the streaming of Redis SLOWLOG or Redis Engine Log to CloudWatch Log"
}
##############################################################################################
#Subnet Group
variable "description_subnet" {
type = string
default = null
description = "The Description of the ElastiCache Subnet Group."
}
variable "subnet_group_name" {
type = string
default = null
description = "The Name of the ElastiCache Subnet Group."
}
variable "subnet_ids" {
description = "The Subnet IDs of the ElastiCache Subnet Group."
type = list(string)
default = [null]
}
##############################################################################################
#Parameter Group
variable "parameter_group_name" {
type = string
default = null
description = "The name of the ElastiCache parameter group."
}
variable "family" {
type = string
default = "redis6.x"
description = "The family of the ElastiCache parameter group."
}
variable "description_parameter" {
type = string
default = null
description = "The description of the ElastiCache parameter group."
}
variable "parameters" {
type = list(map(string))
default = []
description = "List of DB parameters to apply"
}
##############################################################################################
#User
variable "user_id" {
type = string
default = null
description = "The ID of the user."
}
variable "user_name" {
type = string
default = null
description = "The username of the user."
}
variable "access_string" {
type = string
default = null
description = "Access permissions string used for this user. "
}
variable "authentication_mode" {
type = list(object({
type = optional(string)
passwords = optional(string)
}))
default = [{
passwords = null
type = null
}]
description = "Denotes the user's authentication properties. Possible of type options are: password, no-password-required or iam."
}
##############################################################################################
#User Group
variable "user_group_id" {
type = string
default = null
description = "The user group identifier."
}
##############################################################################################
#User Password
variable "password" {
description = "Password for the user."
type = list(string)
default = []
}
variable "random_password_length" {
type = number
default = 16
description = "The length of the string desired. "
}
variable "password_create" {
type = string
default = null
description = "Password Create"
}
##############################################################################################
#Common
variable "tags" {
type = map(string)
default = {}
description = "A map of tags to add to all resources"
}
##############################################################################################