-
Notifications
You must be signed in to change notification settings - Fork 29
/
variables.tf
336 lines (281 loc) · 9.72 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
#Module : LABEL
#Description : Terraform label module variables.
variable "name" {
type = string
default = ""
description = "Name (e.g. `app` or `cluster`)."
}
variable "repository" {
type = string
default = "https://github.com/clouddrove/terraform-aws-elasticache"
description = "Terraform current module repo"
validation {
condition = can(regex("^https://", var.repository))
error_message = "The module-repo value must be a valid Git repo link."
}
}
variable "environment" {
type = string
default = ""
description = "Environment (e.g. `prod`, `dev`, `staging`)."
}
variable "label_order" {
type = list(any)
default = ["environment", "name"]
description = "Label order, e.g. `name`,`application`."
}
variable "extra_tags" {
type = map(string)
default = {}
description = "Additional tags (e.g. map(`BusinessUnit`,`XYZ`)."
}
variable "managedby" {
type = string
default = "[email protected]"
description = "ManagedBy, eg 'CloudDrove' or 'AnmolNagpal'."
}
variable "enable" {
type = bool
default = true
description = "Enable or disable of elasticache"
}
variable "user_group_ids" {
type = list(string)
default = null
description = "User Group ID to associate with the replication group."
}
variable "security_group_names" {
type = list(string)
default = null
description = "A list of cache security group names to associate with this replication group."
}
variable "snapshot_arns" {
type = list(string)
default = null
description = "A single-element string list containing an Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3."
}
variable "replication_group" {
type = map(any)
default = {}
}
variable "subnet_ids" {
type = list(any)
default = []
description = "List of VPC Subnet IDs for the cache subnet group."
sensitive = true
}
variable "subnet_group_description" {
type = string
default = "The Description of the ElastiCache Subnet Group."
description = "Description for the cache subnet group. Defaults to `Managed by Terraform`."
}
variable "availability_zones" {
type = list(string)
description = "A list of EC2 availability zones in which the replication group's cache clusters will be created. The order of the availability zones in the list is not important."
}
variable "auth_token_enable" {
type = bool
default = true
description = "Flag to specify whether to create auth token (password) protected cluster. Can be specified only if transit_encryption_enabled = true."
}
variable "auth_token" {
type = string
default = null
description = "The password used to access a password protected server. Can be specified only if transit_encryption_enabled = true. Find auto generated auth_token in terraform.tfstate or in AWS SSM Parameter Store."
}
variable "cluster_replication_enabled" {
type = bool
default = false
description = "(Redis only) Enabled or disabled replication_group for redis cluster."
}
# Module : Cluster
# Description : Terraform cluster module variables.
variable "cluster_enabled" {
type = bool
default = false
description = "(Memcache only) Enabled or disabled cluster."
}
variable "num_cache_nodes" {
type = number
default = 1
description = "(Required unless replication_group_id is provided) The initial number of cache nodes that the cache cluster will have. For Redis, this value must be 1. For Memcache, this value must be between 1 and 20. If this number is reduced on subsequent runs, the highest numbered nodes will be removed."
}
variable "az_mode" {
type = string
default = "single-az"
description = "(Memcached only) Specifies whether the nodes in this Memcached node group are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region. Valid values for this parameter are single-az or cross-az, default is single-az. If you want to choose cross-az, num_cache_nodes must be greater than 1."
}
variable "log_delivery_configuration" {
type = list(map(any))
default = []
description = "The log_delivery_configuration block allows the streaming of Redis SLOWLOG or Redis Engine Log to CloudWatch Logs or Kinesis Data Firehose. Max of 2 blocks."
}
variable "retention_in_days" {
type = number
default = 0
description = "Specifies the number of days you want to retain log events in the specified log group."
}
variable "kms_key_enabled" {
type = bool
default = true
description = "Specifies whether the kms is enabled or disabled."
}
variable "kms_key_id" {
type = string
default = ""
description = "The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if at_rest_encryption_enabled = true."
}
variable "alias" {
type = string
default = "alias/redis"
description = "The display name of the alias. The name must start with the word `alias` followed by a forward slash."
}
variable "kms_description" {
type = string
default = "Parameter Store KMS master key"
description = "The description of the key as viewed in AWS console."
}
variable "key_usage" {
type = string
default = "ENCRYPT_DECRYPT"
sensitive = true
description = "Specifies the intended use of the key. Defaults to ENCRYPT_DECRYPT, and only symmetric encryption and decryption are supported."
}
variable "network_type" {
type = string
default = "ipv4"
description = "value of the network type. Valid values are ipv4, ipv6 or dual_stack."
}
variable "deletion_window_in_days" {
type = number
default = 7
description = "Duration in days after which the key is deleted after destruction of the resource."
}
variable "is_enabled" {
type = bool
default = true
description = "Specifies whether the key is enabled."
}
variable "enable_key_rotation" {
type = string
default = true
description = "Specifies whether key rotation is enabled."
}
variable "customer_master_key_spec" {
type = string
default = "SYMMETRIC_DEFAULT"
description = "Specifies whether the key contains a symmetric key or an asymmetric key pair and the encryption algorithms or signing algorithms that the key supports. Valid values: SYMMETRIC_DEFAULT, RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, or ECC_SECG_P256K1. Defaults to SYMMETRIC_DEFAULT."
sensitive = true
}
variable "kms_multi_region" {
type = bool
default = false
description = "Indicates whether the KMS key is a multi-Region (true) or regional (false) key."
}
variable "vpc_id" {
type = string
default = ""
description = "The ID of the VPC that the instance security group belongs to."
sensitive = true
}
variable "allowed_ip" {
type = list(any)
default = []
description = "List of allowed ip."
}
variable "allowed_ports" {
type = list(any)
default = []
description = "List of allowed ingress ports"
}
variable "protocol" {
type = string
default = "tcp"
description = "The protocol. If not icmp, tcp, udp, or all use the."
}
variable "enable_security_group" {
type = bool
default = true
description = "Enable default Security Group with only Egress traffic allowed."
}
variable "egress_rule" {
type = bool
default = true
description = "Enable to create egress rule"
}
variable "is_external" {
type = bool
default = false
description = "enable to udated existing security Group"
}
variable "sg_ids" {
type = list(any)
default = []
description = "of the security group id."
}
variable "sg_description" {
type = string
default = "Instance default security group (only egress access is allowed)."
description = "The security group description."
}
variable "sg_egress_description" {
type = string
default = "Description of the rule."
description = "Description of the egress and ingress rule"
}
variable "sg_egress_ipv6_description" {
type = string
default = "Description of the rule."
description = "Description of the egress_ipv6 rule"
}
variable "sg_ingress_description" {
type = string
default = "Description of the ingress rule use elasticache."
description = "Description of the ingress rule"
}
##---------------------route53------------------------
variable "route53_record_enabled" {
type = bool
default = false
description = "Whether to create Route53 record set."
}
variable "memcached_route53_record_enabled" {
type = bool
default = false
description = "Whether to create Route53 record memcached set."
}
variable "route53" {
type = map(any)
default = {}
description = "Route53 Configurations."
}
###------------------------------- ssm_parameter----------------------------
variable "ssm_parameter_endpoint_enabled" {
type = bool
default = false
description = "Name of the parameter."
}
variable "memcached_ssm_parameter_endpoint_enabled" {
type = bool
default = false
description = "Name of the parameter."
}
variable "ssm_parameter_description" {
type = string
default = "Description of the parameter."
description = "SSM Parameters can be imported using."
}
variable "ssm_parameter_type" {
type = string
default = "SecureString"
description = "Type of the parameter."
}
###------------------------------- random_password----------------------------
variable "length" {
type = number
default = 25
}
variable "special" {
type = bool
default = false
}