forked from cloudposse/terraform-aws-elasticache-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
241 lines (202 loc) · 6.49 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
variable "enabled" {
type = bool
description = "Set to false to prevent the module from creating any resources"
default = true
}
variable "namespace" {
type = string
description = "Namespace (e.g. `eg` or `cp`)"
default = ""
}
variable "stage" {
type = string
description = "Stage (e.g. `prod`, `dev`, `staging`)"
default = ""
}
variable "name" {
type = string
description = "Name of the application"
}
variable "use_existing_security_groups" {
type = bool
description = "Flag to enable/disable creation of Security Group in the module. Set to `true` to disable Security Group creation and provide a list of existing security Group IDs in `existing_security_groups` to place the cluster into"
default = false
}
variable "existing_security_groups" {
type = list(string)
default = []
description = "List of existing Security Group IDs to place the cluster into. Set `use_existing_security_groups` to `true` to enable using `existing_security_groups` as Security Groups for the cluster"
}
variable "allowed_security_groups" {
type = list(string)
default = []
description = "List of Security Group IDs that are allowed ingress to the cluster's Security Group created in the module"
}
variable "allowed_cidr_blocks" {
type = list(string)
default = []
description = "List of CIDR blocks that are allowed ingress to the cluster's Security Group created in the module"
}
variable "vpc_id" {
type = string
description = "VPC ID"
}
variable "subnets" {
type = list(string)
description = "Subnet IDs"
default = []
}
variable "elasticache_subnet_group_name" {
type = string
description = "Subnet group name for the ElastiCache instance"
default = ""
}
variable "maintenance_window" {
type = string
default = "wed:03:00-wed:04:00"
description = "Maintenance window"
}
variable "cluster_size" {
type = number
default = 1
description = "Number of nodes in cluster. *Ignored when `cluster_mode_enabled` == `true`*"
}
variable "port" {
type = number
default = 6379
description = "Redis port"
}
variable "instance_type" {
type = string
default = "cache.t2.micro"
description = "Elastic cache instance type"
}
variable "family" {
type = string
default = "redis4.0"
description = "Redis family"
}
variable "parameter" {
type = list(object({
name = string
value = string
}))
default = []
description = "A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another"
}
variable "engine_version" {
type = string
default = "4.0.10"
description = "Redis engine version"
}
variable "at_rest_encryption_enabled" {
type = bool
default = false
description = "Enable encryption at rest"
}
variable "transit_encryption_enabled" {
type = bool
default = true
description = "Enable TLS"
}
variable "notification_topic_arn" {
type = string
default = ""
description = "Notification topic arn"
}
variable "alarm_cpu_threshold_percent" {
type = number
default = 75
description = "CPU threshold alarm level"
}
variable "alarm_memory_threshold_bytes" {
# 10MB
type = number
default = 10000000
description = "Ram threshold alarm level"
}
variable "alarm_actions" {
type = list(string)
description = "Alarm action list"
default = []
}
variable "ok_actions" {
type = list(string)
description = "The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Number (ARN)"
default = []
}
variable "apply_immediately" {
type = bool
default = true
description = "Apply changes immediately"
}
variable "automatic_failover_enabled" {
type = bool
default = false
description = "Automatic failover (Not available for T1/T2 instances)"
}
variable "availability_zones" {
type = list(string)
description = "Availability zone IDs"
default = []
}
variable "zone_id" {
type = string
default = ""
description = "Route53 DNS Zone ID"
}
variable "dns_subdomain" {
type = string
default = ""
description = "The subdomain to use for the CNAME record. If not provided then the CNAME record will use var.name."
}
variable "delimiter" {
type = string
default = "-"
description = "Delimiter between `name`, `namespace`, `stage` and `attributes`"
}
variable "attributes" {
type = list(string)
description = "Additional attributes (_e.g._ \"1\")"
default = []
}
variable "tags" {
type = map(string)
description = "Additional tags (_e.g._ map(\"BusinessUnit\",\"ABC\")"
default = {}
}
variable "auth_token" {
type = string
description = "Auth token for password protecting redis, `transit_encryption_enabled` must be set to `true`. Password must be longer than 16 chars"
default = null
}
variable "replication_group_id" {
type = string
description = "Replication group ID with the following constraints: \nA name must contain from 1 to 20 alphanumeric characters or hyphens. \n The first character must be a letter. \n A name cannot end with a hyphen or contain two consecutive hyphens."
default = ""
}
variable "snapshot_window" {
type = string
description = "The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster."
default = "06:30-07:30"
}
variable "snapshot_retention_limit" {
type = number
description = "The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them."
default = 0
}
variable "cluster_mode_enabled" {
type = bool
description = "Flag to enable/disable creation of a native redis cluster. `automatic_failover_enabled` must be set to `true`. Only 1 `cluster_mode` block is allowed"
default = false
}
variable "cluster_mode_replicas_per_node_group" {
type = number
description = "Number of replica nodes in each node group. Valid values are 0 to 5. Changing this number will force a new resource"
default = 0
}
variable "cluster_mode_num_node_groups" {
type = number
description = "Number of node groups (shards) for this Redis replication group. Changing this number will trigger an online resizing operation before other settings modifications"
default = 0
}