You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrade module to be compatible with AWS Provider 4.0.0 (#21)
BREAKING CHANGES
Removed cluster_mode to use replicas_per_node_group and num_node_groups directly.
number_cache_clusters changed to use num_cache_clusters
availability_zones changed to use preferred_cache_cluster_azs
replication_group_description changed to use description
You will still need to set cluster_mode_enabled to true if you want a Redis cluster.
These changes are based on the deprecation warnings that are received when trying to use this module with provider >=4.0.0
[](https://github.com/umotif-public/terraform-aws-elasticache-redis/releases/latest)
2
2
3
3
# terraform-aws-elasticache-redis
4
4
5
5
A Terraform module to create an AWS Redis ElastiCache cluster
6
6
7
7
## Terraform versions
8
8
9
-
Terraform 0.14.5 and higher, pin module version to `~> v2.0`.
10
-
For Terraform 0.12 to 0.14.4, pin module version to `~> v1.0`.
11
-
Submit pull-requests to `main` branch.
9
+
- For AWS Provider >= 4.0.0, pin module version to `~> v3.0`.
10
+
- For Terraform 0.14.5 and higher *and* AWS Provider < 4.0.0, pin module version to `~> v2.0`.
11
+
- For Terraform 0.12 to 0.14.4, pin module version to `~> v1.0`.
| <aname="input_at_rest_encryption_enabled"></a> [at\_rest\_encryption\_enabled](#input\_at\_rest\_encryption\_enabled)| Whether to enable encryption at rest. |`bool`|`true`| no |
106
108
| <aname="input_auth_token"></a> [auth\_token](#input\_auth\_token)| The password used to access a password protected server. Can be specified only if `transit_encryption_enabled = true`. |`string`|`""`| no |
107
109
| <aname="input_auto_minor_version_upgrade"></a> [auto\_minor\_version\_upgrade](#input\_auto\_minor\_version\_upgrade)| n/a |`string`|`true`| no |
108
-
| <aname="input_automatic_failover_enabled"></a> [automatic\_failover\_enabled](#input\_automatic\_failover\_enabled)| Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. |`bool`|`true`| no |
109
-
| <aname="input_availability_zones"></a> [availability\_zones](#input\_availability\_zones)| 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. |`list(string)`|`null`| no |
110
+
| <aname="input_automatic_failover_enabled"></a> [automatic\_failover\_enabled](#input\_automatic\_failover\_enabled)| Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If enabled, number\_cache\_clusters must be greater than 1. Must be enabled for Redis (cluster mode enabled) replication groups. |`bool`|`true`| no |
110
111
| <aname="input_cluster_mode_enabled"></a> [cluster\_mode\_enabled](#input\_cluster\_mode\_enabled)| Enable creation of a native redis cluster. |`bool`|`false`| no |
111
112
| <aname="input_description"></a> [description](#input\_description)| The description of the all resources. |`string`|`"Managed by Terraform"`| no |
112
113
| <aname="input_engine_version"></a> [engine\_version](#input\_engine\_version)| The version number of the cache engine to be used for the cache clusters in this replication group. |`string`|`"5.0.6"`| no |
@@ -117,15 +118,16 @@ No modules.
117
118
| <aname="input_ingress_self"></a> [ingress\_self](#input\_ingress\_self)| Specify whether the security group itself will be added as a source to the ingress rule. |`bool`|`false`| no |
118
119
| <aname="input_kms_key_id"></a> [kms\_key\_id](#input\_kms\_key\_id)| 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`|`string`|`""`| no |
119
120
| <aname="input_maintenance_window"></a> [maintenance\_window](#input\_maintenance\_window)| Specifies the weekly time range for when maintenance on the cache cluster is performed. |`string`|`""`| no |
120
-
| <aname="input_multi_az_enabled"></a> [multi\_az\_enabled](#input\_multi\_az\_enabled)| Specifies whether to enable Multi-AZ Support for the replication group. If true, `automatic_failover_enabled` must also be enabled. Defaults to false. |`string`|`null`| no |
121
+
| <aname="input_multi_az_enabled"></a> [multi\_az\_enabled](#input\_multi\_az\_enabled)| Specifies whether to enable Multi-AZ Support for the replication group. If true, `automatic_failover_enabled` must also be enabled. Defaults to false. |`string`|`false`| no |
121
122
| <aname="input_name_prefix"></a> [name\_prefix](#input\_name\_prefix)| The replication group identifier. This parameter is stored as a lowercase string. |`string`| n/a | yes |
122
123
| <aname="input_node_type"></a> [node\_type](#input\_node\_type)| The compute and memory capacity of the nodes in the node group. |`string`| n/a | yes |
123
124
| <aname="input_notification_topic_arn"></a> [notification\_topic\_arn](#input\_notification\_topic\_arn)| An Amazon Resource Name (ARN) of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic`|`string`|`""`| no |
124
-
| <aname="input_num_node_groups"></a> [num\_node\_groups](#input\_num\_node\_groups)|Required when `cluster_mode_enabled` is set to true. Specify the number of node groups (shards) for this Redis replication group. Changing this number will trigger an online resizing operation before other settings modifications. |`number`|`0`| no |
125
-
| <aname="input_number_cache_clusters"></a> [number\_cache\_clusters](#input\_number\_cache\_clusters)|The number of cache clusters (primary and replicas) this replication groupwill have. |`number`|n/a|yes|
125
+
| <aname="input_num_cache_clusters"></a> [num\_cache\_clusters](#input\_num\_cache\_clusters)|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. Conflicts with num\_node\_groups. |`number`|`1`| no |
126
+
| <aname="input_num_node_groups"></a> [num\_node\_groups](#input\_num\_node\_groups)|Specify the number of node groups (shards) for this Redis replication group. Changing this number will trigger an online resizing operation before other settings modifications. |`number`|`0`|no|
126
127
| <aname="input_parameter"></a> [parameter](#input\_parameter)| A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | <pre>list(object({<br> name = string<br> value = string<br> }))</pre> |`[]`| no |
127
128
| <aname="input_port"></a> [port](#input\_port)| The port number on which each of the cache nodes will accept connections. |`number`|`6379`| no |
128
-
| <aname="input_replicas_per_node_group"></a> [replicas\_per\_node\_group](#input\_replicas\_per\_node\_group)| Required when `cluster_mode_enabled` is set to true. Specify the number of replica nodes in each node group. Valid values are 0 to 5. Changing this number will force a new resource. |`number`|`0`| no |
129
+
| <aname="input_preferred_cache_cluster_azs"></a> [preferred\_cache\_cluster\_azs](#input\_preferred\_cache\_cluster\_azs)| 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. |`list(string)`|`null`| no |
130
+
| <aname="input_replicas_per_node_group"></a> [replicas\_per\_node\_group](#input\_replicas\_per\_node\_group)| Specify the number of replica nodes in each node group. Valid values are 0 to 5. Changing this number will trigger an online resizing operation before other settings modifications. |`number`|`0`| no |
129
131
| <aname="input_security_group_ids"></a> [security\_group\_ids](#input\_security\_group\_ids)| List of Security Groups. |`list(string)`|`[]`| no |
130
132
| <aname="input_snapshot_retention_limit"></a> [snapshot\_retention\_limit](#input\_snapshot\_retention\_limit)| The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. |`number`|`30`| no |
131
133
| <aname="input_snapshot_window"></a> [snapshot\_window](#input\_snapshot\_window)| The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. |`string`|`""`| no |
@@ -164,9 +166,9 @@ See LICENSE for full details.
164
166
165
167
### Install dependencies
166
168
167
-
*[`pre-commit`](https://pre-commit.com/#install)
168
-
*[`terraform-docs`](https://github.com/segmentio/terraform-docs) required for `terraform_docs` hooks.
169
-
*[`TFLint`](https://github.com/terraform-linters/tflint) required for `terraform_tflint` hook.
169
+
-[`pre-commit`](https://pre-commit.com/#install)
170
+
-[`terraform-docs`](https://github.com/segmentio/terraform-docs) required for `terraform_docs` hooks.
171
+
-[`TFLint`](https://github.com/terraform-linters/tflint) required for `terraform_tflint` hook.
0 commit comments