generated from pbs/terraform-aws-template-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptional.tf
260 lines (219 loc) · 10.5 KB
/
optional.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
variable "name" {
description = "Name of the ElastiCache Redis instance. If null, will default to product."
default = null
type = string
}
variable "node_type" {
description = "ElastiCache node type"
default = "cache.t3.micro"
type = string
}
variable "apply_immediately" {
description = "Whether any database modifications are applied immediately, or during the next maintenance window."
default = false
type = bool
}
variable "auto_minor_version_upgrade" {
description = "Specifies whether minor version engine upgrades will be applied automatically to the underlying nodes during the maintenance window. Only supported for engine type \"redis\" and if the engine version is 6 or higher."
default = true
type = bool
}
variable "engine" {
description = "The engine to use ('valkey' or 'redis')"
default = "redis"
type = string
validation {
condition = contains(["redis", "valkey"], var.engine)
error_message = "Engine must be 'redis' or 'valkey'"
}
}
variable "engine_version" {
description = "Version number of the cache engine to be used. If not set, defaults to the latest version. See Describe Cache Engine Versions in the AWS Documentation for supported versions. When engine is redis and the version is 6 or higher, the major and minor version can be set, e.g., 6.2, or the minor version can be unspecified which will use the latest version at creation time, e.g., 6.x. Otherwise, specify the full version desired, e.g., 5.0.6."
default = null
type = string
}
variable "final_snapshot_identifier" {
description = "Name of your final cluster snapshot. If omitted, no final snapshot will be made."
default = null
type = string
}
variable "maintenance_window" {
description = "Specifies the weekly time range for when maintenance on the cluster is performed. The format is ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: sun:05:00-sun:09:00."
default = "mon:07:00-mon:08:00"
type = string
}
variable "notification_topic_arn" {
description = "ARN of an SNS topic to send ElastiCache notifications to. Example: arn:aws:sns:us-east-1:012345678999:my_sns_topic."
default = null
type = string
}
variable "port" {
description = "The port number on which each of the cache nodes will accept connections. Cannot be provided with replication_group_id. Changing this value will re-create the resource."
default = 6379
type = number
}
variable "security_group_ids" {
description = "One or more VPC security groups associated with the nodes. If null, use the one provided by this module."
default = null
type = list(string)
}
variable "snapshot_arns" {
description = "Single-element string list containing an Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. The object name cannot contain any commas. Changing snapshot_arns forces a new resource."
default = null
type = list(string)
}
variable "snapshot_retention_limit" {
description = "Number of days for which ElastiCache will retain automatic 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 cache nodes."
default = null
type = number
}
variable "snapshot_window" {
description = "Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your nodes. Example: 05:00-09:00"
default = null
type = string
}
variable "subnet_group_name" {
description = "Name of the subnet group to be used for the cluster. Changing this value will re-create the resource. If null, will use the subnet group created by this module."
default = null
type = string
}
variable "vpc_id" {
description = "VPC ID to create the nodes in. If null, one will be guessed based on `vpc_data_lookup_tags`."
default = null
type = string
}
variable "vpc_data_lookup_tags" {
description = "Value of the `tags` parameter in the `aws_vpc` data source used in this module. If null, a dynamic lookup based on `environment` will be used. Ignored if `vpc_id` is populated."
default = null
type = map(string)
}
variable "subnets" {
description = "List of subnet IDs to create cluster nodes in. If null, a list will be generated by looking up subnets in the resolved VPC."
default = null
type = list(string)
}
variable "subnet_data_lookup_filters" {
description = "Values of the `filter` blocks in the `aws_subnets` data source used in this module. If null, one will be guessed using the resolved VPC and a `Name` filter of `*-private-*`. Ignored if `subnets` is populated."
default = null
type = map(any)
}
variable "use_prefix" {
description = "Whether to use prefixes in the resource names. If false, will use a fully specified name for resources."
default = true
type = bool
}
variable "sg_name" {
description = "Name of the security group to be created. If null, will use the name of the nodes."
default = null
type = string
}
variable "replication_group_description" {
description = "Description of the replication group to be created. If null, one will be generated using the name of the nodes."
default = null
type = string
}
variable "replication_group_id" {
description = "Replication group identifier. This parameter is stored as a lowercase string. If null, the name of the nodes will be used."
default = null
type = string
}
variable "at_rest_encryption_enabled" {
description = "Whether to enable encryption at rest. Because there is a performance hit to enabling this feature, the default is false. Consider setting to true if your application can tolerate it."
default = false
type = bool
}
variable "auth_token" {
description = "Password used to access a password protected server. Can be specified only if transit_encryption_enabled = true."
default = null
type = string
}
variable "automatic_failover_enabled" {
description = "Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If null, will be enabled if `nodes` > 1. If true, `nodes` must be greater than 1."
default = null
type = bool
}
variable "data_tiering_enabled" {
description = "Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to true when using r6gd nodes."
default = false
type = bool
}
variable "parameter_group_name" {
description = "Name of the parameter group to be created."
default = null
type = string
}
variable "user_group_ids" {
description = "User Group ID to associate with the replication group. Only a maximum of one (1) user group ID is valid. NOTE: This argument is a set because the AWS specification allows for multiple IDs. However, in practice, AWS only allows a maximum size of one."
default = null
type = list(string)
}
variable "transit_encryption_enabled" {
description = "Whether to enable encryption at rest. Because there is a performance hit to enabling this feature, the default is false. Consider setting to true if your application can tolerate it."
default = false
type = bool
}
variable "preferred_cache_cluster_azs" {
description = "List of availability zones in which to create cluster."
default = null
type = list(string)
}
variable "nodes" {
description = "Number of nodes (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. Conflicts with num_node_groups, the deprecatednumber_cache_clusters, or the deprecated cluster_mode."
default = 2
type = number
}
variable "multi_az_enabled" {
description = "Whether to enable Multi-AZ. If Multi-AZ is enabled, the value of nodes must be at least 2."
default = false
type = bool
}
variable "kms_key_id" {
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."
default = null
type = string
}
variable "global_replication_group_id" {
description = "The ID of the global replication group to which this replication group should belong. If this parameter is specified, the replication group is added to the specified global replication group as a secondary replication group; otherwise, the replication group is not part of any global replication group. If global_replication_group_id is set, the num_node_groups parameter cannot be set."
default = null
type = string
}
variable "egress_cidr_blocks" {
description = "List of CIDR blocks to assign to the egress rule of the security group. If null, `egress_security_group_ids` must be used."
default = ["10.0.0.0/8"]
type = list(string)
}
variable "egress_source_sg_id" {
description = "List of security group ID to assign to the egress rule of the security group. If null, `egress_cidr_blocks` must be used."
default = null
type = string
}
variable "cname" {
description = "The value to use for the CNAME record if `create_dns` is true. The primary endpoint will be <cname>.<private_hosted_zone>, and the reader endpoint will be <cname>-ro.<private_hosted_zone>. If null, the name variable will be used instead."
default = null
type = string
}
variable "create_dns" {
description = "Whether to create DNS records for the primary and reader endpoints."
default = true
type = bool
}
variable "dns_ttl" {
description = "TTL for DNS records."
default = 300
type = number
}
variable "private_hosted_zone" {
description = "Private hosted zone to create DNS records in. If null, `create_dns` must be set to false."
default = null
type = string
}
variable "log_delivery_configurations" {
description = "List of log delivery configurations. https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_cluster#log-delivery-configuration"
default = []
type = list(object({
destination = string
destination_type = string
log_format = string
log_type = string
}))
}