-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
315 lines (266 loc) · 10.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
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
variable "name" {
type = string
default = "redis"
description = "Name of resources related to redis cluster."
}
variable "tags" {
type = map(any)
description = "Additional tags for all resource which created by this module"
}
variable "environment" {
type = string
default = ""
description = "Environment (e.g. `prod`, `dev`, `staging`)."
}
variable "enable" {
type = bool
default = true
description = "Enable or disable of elasticache"
}
variable "engine" {
type = string
default = ""
description = "The name of the cache engine to be used for the clusters in this replication group. e.g. redis."
}
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. If true, Multi-AZ is enabled for this replication group. If false, Multi-AZ is disabled for this replication group. Must be enabled for Redis (cluster mode enabled) replication groups. Defaults to false."
}
variable "engine_version" {
type = string
default = ""
description = "The version number of the cache engine to be used for the cache clusters in this replication group."
}
variable "port" {
type = string
default = ""
description = "the port number on which each of the cache nodes will accept connections."
sensitive = true
}
variable "user_group_ids" {
type = list(string)
default = null
description = "User Group ID to associate with the replication group."
}
variable "node_type" {
type = string
default = "cache.t2.small"
description = "The compute and memory capacity of the nodes in the node 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 "snapshot_name" {
type = string
default = ""
description = "The name of a snapshot from which to restore data into the new node group. Changing the snapshot_name forces a new resource."
sensitive = true
}
variable "snapshot_window" {
type = string
default = null
description = "(Redis only) The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. The minimum snapshot window is a 60 minute period."
}
variable "snapshot_retention_limit" {
type = string
default = "0"
description = "(Redis only) The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days before being deleted. If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. Please note that setting a snapshot_retention_limit is not supported on cache.t1.micro or cache.t2.* cache nodes."
}
variable "notification_topic_arn" {
type = string
default = ""
description = "An Amazon Resource Name (ARN) of an SNS topic to send ElastiCache notifications to."
sensitive = true
}
variable "apply_immediately" {
type = bool
default = false
description = "Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is false."
}
variable "subnet_ids" {
type = list(any)
default = []
description = "List of VPC Subnet IDs for the cache subnet group."
sensitive = true
}
variable "subnet_group_names" {
type = string
default = "One, two, three"
description = "Name for the cache subnet group. Defaults to `Managed by Terraform`."
}
variable "replication_group_description" {
type = string
default = "User-created description for the replication group."
description = "Name of either the CloudWatch Logs LogGroup or Kinesis Data Firehose resource."
}
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 "num_cache_clusters" {
type = number
default = 1
description = "(Required for Cluster Mode Disabled) The number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications."
}
variable "auto_minor_version_upgrade" {
type = bool
default = true
description = "Specifies whether a minor engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Defaults to true."
}
variable "maintenance_window" {
type = string
default = "sun:05:00-sun:06:00"
description = "Maintenance window."
}
variable "at_rest_encryption_enabled" {
type = bool
default = true
description = "Enable encryption at rest."
}
variable "transit_encryption_enabled" {
type = bool
default = true
description = "Whether to enable encryption in transit."
}
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."
}
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 "parameter_group_name" {
type = string
default = "default.redis5.0"
description = "The name of the parameter group to associate with this replication group. If this argument is omitted, the default cache parameter group for the specified engine is used."
}
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 "multi_az_enabled" {
type = bool
default = false
description = "Specifies whether to enable Multi-AZ Support for the replication group. If true, automatic_failover_enabled must also be enabled. Defaults to false."
}
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 "deletion_window_in_days" {
type = number
default = 7
description = "Duration in days after which the key is deleted after destruction of the resource."
}
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"
}
variable "length" {
type = number
default = 25
}
variable "special" {
type = bool
default = false
}