From ac9194dff1fcc9b1a94616616ae9a2de81590160 Mon Sep 17 00:00:00 2001 From: magreenbaum Date: Mon, 14 Oct 2024 17:00:43 -0400 Subject: [PATCH 1/5] add user attachment timeouts, cluster_mode, and version upgrade --- README.md | 7 ++--- examples/memcached-cluster/README.md | 4 +-- examples/memcached-cluster/versions.tf | 2 +- examples/redis-cluster-mode/README.md | 4 +-- examples/redis-cluster-mode/versions.tf | 2 +- examples/redis-cluster/README.md | 4 +-- examples/redis-cluster/versions.tf | 2 +- .../redis-global-replication-group/README.md | 6 ++--- .../versions.tf | 2 +- .../README.md | 4 +-- .../versions.tf | 2 +- examples/redis-replication-group/README.md | 4 +-- examples/redis-replication-group/main.tf | 27 +++++++++++++++++++ examples/redis-replication-group/versions.tf | 2 +- examples/serverless-cache/versions.tf | 2 +- main.tf | 2 ++ modules/serverless-cache/README.md | 4 +-- modules/serverless-cache/versions.tf | 2 +- modules/user-group/README.md | 4 +-- modules/user-group/main.tf | 5 ++++ modules/user-group/versions.tf | 2 +- variables.tf | 6 +++++ versions.tf | 2 +- 23 files changed, 71 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index cc03bfb..fe32e70 100644 --- a/README.md +++ b/README.md @@ -284,14 +284,14 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.47 | +| [aws](#requirement\_aws) | >= 5.71 | | [random](#requirement\_random) | >= 3.0 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.47 | +| [aws](#provider\_aws) | >= 5.71 | | [random](#provider\_random) | >= 3.0 | ## Modules @@ -344,7 +344,7 @@ No modules. | [global\_replication\_group\_id](#input\_global\_replication\_group\_id) | The ID of the global replication group to which this replication group should belong | `string` | `null` | no | | [ip\_discovery](#input\_ip\_discovery) | The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6` | `string` | `null` | no | | [kms\_key\_arn](#input\_kms\_key\_arn) | 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` | `null` | no | -| [log\_delivery\_configuration](#input\_log\_delivery\_configuration) | (Redis only) Specifies the destination and format of Redis SLOWLOG or Redis Engine Log | `any` |
{
"slow-log": {
"destination_type": "cloudwatch-logs",
"log_format": "json"
}
}
| no | +| [log\_delivery\_configuration](#input\_log\_delivery\_configuration) | (Redis only) Specifies the destination and format of Redis SLOWLOG or Redis Engine Log | `any` |
{
"slow-log": {
"destination_type": "cloudwatch-logs",
"log_format": "json"
}
}
| no | | [maintenance\_window](#input\_maintenance\_window) | Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC) | `string` | `null` | no | | [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` | `bool` | `false` | no | | [network\_type](#input\_network\_type) | The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dual_stack` | `string` | `null` | no | @@ -363,6 +363,7 @@ No modules. | [preferred\_cache\_cluster\_azs](#input\_preferred\_cache\_cluster\_azs) | 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 considered. The first item in the list will be the primary node. Ignored when updating | `list(string)` | `[]` | no | | [preferred\_outpost\_arn](#input\_preferred\_outpost\_arn) | (Required if `outpost_mode` is specified) The outpost ARN in which the cache cluster will be created | `string` | `null` | no | | [replicas\_per\_node\_group](#input\_replicas\_per\_node\_group) | Number of replica nodes in each node group. Changing this number will trigger a resizing operation before other settings modifications. Valid values are 0 to 5 | `number` | `null` | no | +| [replication\_group\_cluster\_mode](#input\_replication\_group\_cluster\_mode) | Specifies whether cluster mode is enabled or disabled. Valid values are enabled or disabled or compatible | `string` | `null` | no | | [replication\_group\_id](#input\_replication\_group\_id) | Replication group identifier. When `create_replication_group` is set to `true`, this is the ID assigned to the replication group created. When `create_replication_group` is set to `false`, this is the ID of an externally created replication group | `string` | `null` | no | | [security\_group\_description](#input\_security\_group\_description) | Description of the security group created | `string` | `null` | no | | [security\_group\_ids](#input\_security\_group\_ids) | One or more VPC security groups associated with the cache cluster | `list(string)` | `[]` | no | diff --git a/examples/memcached-cluster/README.md b/examples/memcached-cluster/README.md index 142e439..71fe41a 100644 --- a/examples/memcached-cluster/README.md +++ b/examples/memcached-cluster/README.md @@ -20,13 +20,13 @@ Note that this example may create resources which will incur monetary charges on | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.47 | +| [aws](#requirement\_aws) | >= 5.71 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.47 | +| [aws](#provider\_aws) | >= 5.71 | ## Modules diff --git a/examples/memcached-cluster/versions.tf b/examples/memcached-cluster/versions.tf index 407a955..0615775 100644 --- a/examples/memcached-cluster/versions.tf +++ b/examples/memcached-cluster/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.47" + version = ">= 5.71" } } } diff --git a/examples/redis-cluster-mode/README.md b/examples/redis-cluster-mode/README.md index 5a837ac..9d1a578 100644 --- a/examples/redis-cluster-mode/README.md +++ b/examples/redis-cluster-mode/README.md @@ -22,13 +22,13 @@ Note that this example may create resources which will incur monetary charges on | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.47 | +| [aws](#requirement\_aws) | >= 5.71 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.47 | +| [aws](#provider\_aws) | >= 5.71 | ## Modules diff --git a/examples/redis-cluster-mode/versions.tf b/examples/redis-cluster-mode/versions.tf index 407a955..0615775 100644 --- a/examples/redis-cluster-mode/versions.tf +++ b/examples/redis-cluster-mode/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.47" + version = ">= 5.71" } } } diff --git a/examples/redis-cluster/README.md b/examples/redis-cluster/README.md index e04cac3..1d3d4f4 100644 --- a/examples/redis-cluster/README.md +++ b/examples/redis-cluster/README.md @@ -20,13 +20,13 @@ Note that this example may create resources which will incur monetary charges on | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.47 | +| [aws](#requirement\_aws) | >= 5.71 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.47 | +| [aws](#provider\_aws) | >= 5.71 | ## Modules diff --git a/examples/redis-cluster/versions.tf b/examples/redis-cluster/versions.tf index 407a955..0615775 100644 --- a/examples/redis-cluster/versions.tf +++ b/examples/redis-cluster/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.47" + version = ">= 5.71" } } } diff --git a/examples/redis-global-replication-group/README.md b/examples/redis-global-replication-group/README.md index 2a193ae..7ee97b6 100644 --- a/examples/redis-global-replication-group/README.md +++ b/examples/redis-global-replication-group/README.md @@ -24,14 +24,14 @@ Note that this example may create resources which will incur monetary charges on | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.47 | +| [aws](#requirement\_aws) | >= 5.71 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.47 | -| [aws.euwest1](#provider\_aws.euwest1) | >= 5.47 | +| [aws](#provider\_aws) | >= 5.71 | +| [aws.euwest1](#provider\_aws.euwest1) | >= 5.71 | ## Modules diff --git a/examples/redis-global-replication-group/versions.tf b/examples/redis-global-replication-group/versions.tf index 407a955..0615775 100644 --- a/examples/redis-global-replication-group/versions.tf +++ b/examples/redis-global-replication-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.47" + version = ">= 5.71" } } } diff --git a/examples/redis-replication-group-with-cluster-replica/README.md b/examples/redis-replication-group-with-cluster-replica/README.md index 2f06f4c..7c3b025 100644 --- a/examples/redis-replication-group-with-cluster-replica/README.md +++ b/examples/redis-replication-group-with-cluster-replica/README.md @@ -20,13 +20,13 @@ Note that this example may create resources which will incur monetary charges on | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.47 | +| [aws](#requirement\_aws) | >= 5.71 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.47 | +| [aws](#provider\_aws) | >= 5.71 | ## Modules diff --git a/examples/redis-replication-group-with-cluster-replica/versions.tf b/examples/redis-replication-group-with-cluster-replica/versions.tf index 407a955..0615775 100644 --- a/examples/redis-replication-group-with-cluster-replica/versions.tf +++ b/examples/redis-replication-group-with-cluster-replica/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.47" + version = ">= 5.71" } } } diff --git a/examples/redis-replication-group/README.md b/examples/redis-replication-group/README.md index 7d3e3ad..75d8720 100644 --- a/examples/redis-replication-group/README.md +++ b/examples/redis-replication-group/README.md @@ -20,13 +20,13 @@ Note that this example may create resources which will incur monetary charges on | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.47 | +| [aws](#requirement\_aws) | >= 5.71 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.47 | +| [aws](#provider\_aws) | >= 5.71 | ## Modules diff --git a/examples/redis-replication-group/main.tf b/examples/redis-replication-group/main.tf index 52ae6ed..d903806 100644 --- a/examples/redis-replication-group/main.tf +++ b/examples/redis-replication-group/main.tf @@ -63,6 +63,33 @@ module "elasticache" { } ] + # log group configuration examples + log_delivery_configuration = { + slow-log = { + destination_type = "cloudwatch-logs" + log_format = "json" + } + engine-log = { + destination_type = "cloudwatch-logs" + log_format = "json" + # to use the same log group for different log types + create_cloudwatch_log_group = false + } + + # to create a cloudwatch log group for each log type + # specify cloudwatch_log_group_name + # slow-log = { + # cloudwatch_log_group_name = "${local.name}-slow-log" + # destination_type = "cloudwatch-logs" + # log_format = "json" + # } + # engine-log = { + # cloudwatch_log_group_name = "${local.name}-engine-log" + # destination_type = "cloudwatch-logs" + # log_format = "json" + # } + } + tags = local.tags } diff --git a/examples/redis-replication-group/versions.tf b/examples/redis-replication-group/versions.tf index 407a955..0615775 100644 --- a/examples/redis-replication-group/versions.tf +++ b/examples/redis-replication-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.47" + version = ">= 5.71" } } } diff --git a/examples/serverless-cache/versions.tf b/examples/serverless-cache/versions.tf index 407a955..0615775 100644 --- a/examples/serverless-cache/versions.tf +++ b/examples/serverless-cache/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.47" + version = ">= 5.71" } } } diff --git a/main.tf b/main.tf index a4f6c95..507db0c 100644 --- a/main.tf +++ b/main.tf @@ -75,6 +75,7 @@ resource "aws_elasticache_replication_group" "this" { auth_token_update_strategy = var.auth_token_update_strategy auto_minor_version_upgrade = var.auto_minor_version_upgrade automatic_failover_enabled = var.multi_az_enabled || var.cluster_mode_enabled ? true : var.automatic_failover_enabled + cluster_mode = var.replication_group_cluster_mode data_tiering_enabled = var.data_tiering_enabled description = coalesce(var.description, "Replication group") engine = var.engine @@ -152,6 +153,7 @@ resource "aws_elasticache_replication_group" "global" { auth_token_update_strategy = var.auth_token_update_strategy auto_minor_version_upgrade = var.auto_minor_version_upgrade automatic_failover_enabled = var.multi_az_enabled || var.cluster_mode_enabled ? true : var.automatic_failover_enabled + cluster_mode = var.replication_group_cluster_mode data_tiering_enabled = var.data_tiering_enabled description = coalesce(var.description, "Global replication group") engine = var.create_secondary_global_replication_group ? null : var.engine diff --git a/modules/serverless-cache/README.md b/modules/serverless-cache/README.md index c4860b1..e4605fb 100644 --- a/modules/serverless-cache/README.md +++ b/modules/serverless-cache/README.md @@ -60,13 +60,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.47 | +| [aws](#requirement\_aws) | >= 5.71 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.47 | +| [aws](#provider\_aws) | >= 5.71 | ## Modules diff --git a/modules/serverless-cache/versions.tf b/modules/serverless-cache/versions.tf index 407a955..0615775 100644 --- a/modules/serverless-cache/versions.tf +++ b/modules/serverless-cache/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.47" + version = ">= 5.71" } } } diff --git a/modules/user-group/README.md b/modules/user-group/README.md index 743fd4e..b1584fe 100644 --- a/modules/user-group/README.md +++ b/modules/user-group/README.md @@ -66,13 +66,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.47 | +| [aws](#requirement\_aws) | >= 5.71 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.47 | +| [aws](#provider\_aws) | >= 5.71 | ## Modules diff --git a/modules/user-group/main.tf b/modules/user-group/main.tf index 7919fb7..2d826f0 100644 --- a/modules/user-group/main.tf +++ b/modules/user-group/main.tf @@ -74,4 +74,9 @@ resource "aws_elasticache_user_group_association" "this" { user_group_id = var.create && var.create_group ? aws_elasticache_user_group.this[0].user_group_id : each.value.user_group_id user_id = aws_elasticache_user.this[each.key].user_id + + timeouts { + create = try(each.value.timeouts.create, null) + delete = try(each.value.timeouts.delete, null) + } } diff --git a/modules/user-group/versions.tf b/modules/user-group/versions.tf index 407a955..0615775 100644 --- a/modules/user-group/versions.tf +++ b/modules/user-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.47" + version = ">= 5.71" } } } diff --git a/variables.tf b/variables.tf index 2ff4aff..e4967ac 100644 --- a/variables.tf +++ b/variables.tf @@ -269,6 +269,12 @@ variable "replicas_per_node_group" { default = null } +variable "replication_group_cluster_mode" { + description = "Specifies whether cluster mode is enabled or disabled. Valid values are enabled or disabled or compatible" + type = string + default = null +} + variable "replication_group_id" { description = "Replication group identifier. When `create_replication_group` is set to `true`, this is the ID assigned to the replication group created. When `create_replication_group` is set to `false`, this is the ID of an externally created replication group" type = string diff --git a/versions.tf b/versions.tf index 7cd9c04..0bf905c 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.47" + version = ">= 5.71" } random = { source = "hashicorp/random" From 03f6e43686db69177d7e609ec5fb3516baabaf73 Mon Sep 17 00:00:00 2001 From: magreenbaum Date: Mon, 14 Oct 2024 19:49:29 -0400 Subject: [PATCH 2/5] update timeout block and add example --- examples/serverless-cache/main.tf | 3 +++ modules/user-group/main.tf | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/serverless-cache/main.tf b/examples/serverless-cache/main.tf index aa29dd4..6516453 100644 --- a/examples/serverless-cache/main.tf +++ b/examples/serverless-cache/main.tf @@ -63,6 +63,9 @@ module "cache_user_group" { authentication_mode = { type = "no-password-required" } + timeouts = { + create = "20m" + } } } diff --git a/modules/user-group/main.tf b/modules/user-group/main.tf index 2d826f0..d21e509 100644 --- a/modules/user-group/main.tf +++ b/modules/user-group/main.tf @@ -75,8 +75,11 @@ resource "aws_elasticache_user_group_association" "this" { user_group_id = var.create && var.create_group ? aws_elasticache_user_group.this[0].user_group_id : each.value.user_group_id user_id = aws_elasticache_user.this[each.key].user_id - timeouts { - create = try(each.value.timeouts.create, null) - delete = try(each.value.timeouts.delete, null) + dynamic "timeouts" { + for_each = try([each.value.timeouts], []) + content { + create = try(timeouts.value.create, null) + delete = try(timeouts.value.delete, null) + } } } From 2b10b4fdc909cceb0613471f8f99f2527a54df1e Mon Sep 17 00:00:00 2001 From: magreenbaum Date: Mon, 14 Oct 2024 21:33:26 -0400 Subject: [PATCH 3/5] adjust example --- examples/redis-replication-group/main.tf | 27 ------------------------ 1 file changed, 27 deletions(-) diff --git a/examples/redis-replication-group/main.tf b/examples/redis-replication-group/main.tf index d903806..52ae6ed 100644 --- a/examples/redis-replication-group/main.tf +++ b/examples/redis-replication-group/main.tf @@ -63,33 +63,6 @@ module "elasticache" { } ] - # log group configuration examples - log_delivery_configuration = { - slow-log = { - destination_type = "cloudwatch-logs" - log_format = "json" - } - engine-log = { - destination_type = "cloudwatch-logs" - log_format = "json" - # to use the same log group for different log types - create_cloudwatch_log_group = false - } - - # to create a cloudwatch log group for each log type - # specify cloudwatch_log_group_name - # slow-log = { - # cloudwatch_log_group_name = "${local.name}-slow-log" - # destination_type = "cloudwatch-logs" - # log_format = "json" - # } - # engine-log = { - # cloudwatch_log_group_name = "${local.name}-engine-log" - # destination_type = "cloudwatch-logs" - # log_format = "json" - # } - } - tags = local.tags } From 70f324e265f089a61d203950c4defaedde55a388 Mon Sep 17 00:00:00 2001 From: magreenbaum Date: Tue, 15 Oct 2024 19:18:25 -0400 Subject: [PATCH 4/5] update variable name --- README.md | 2 +- main.tf | 4 ++-- variables.tf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fe32e70..5abf425 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,7 @@ No modules. | [availability\_zone](#input\_availability\_zone) | Availability Zone for the cache cluster. If you want to create cache nodes in multi-az, use `preferred_availability_zones` instead | `string` | `null` | no | | [az\_mode](#input\_az\_mode) | 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` | `string` | `null` | no | | [cluster\_id](#input\_cluster\_id) | Group identifier. ElastiCache converts this name to lowercase. Changing this value will re-create the resource | `string` | `""` | no | +| [cluster\_mode](#input\_cluster\_mode) | Specifies whether cluster mode is enabled or disabled. Valid values are enabled or disabled or compatible | `string` | `null` | no | | [cluster\_mode\_enabled](#input\_cluster\_mode\_enabled) | Whether to enable Redis [cluster mode https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Replication.Redis-RedisCluster.html] | `bool` | `false` | no | | [create](#input\_create) | Determines whether resources will be created (affects all resources) | `bool` | `true` | no | | [create\_cluster](#input\_create\_cluster) | Determines whether an ElastiCache cluster will be created or not | `bool` | `false` | no | @@ -363,7 +364,6 @@ No modules. | [preferred\_cache\_cluster\_azs](#input\_preferred\_cache\_cluster\_azs) | 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 considered. The first item in the list will be the primary node. Ignored when updating | `list(string)` | `[]` | no | | [preferred\_outpost\_arn](#input\_preferred\_outpost\_arn) | (Required if `outpost_mode` is specified) The outpost ARN in which the cache cluster will be created | `string` | `null` | no | | [replicas\_per\_node\_group](#input\_replicas\_per\_node\_group) | Number of replica nodes in each node group. Changing this number will trigger a resizing operation before other settings modifications. Valid values are 0 to 5 | `number` | `null` | no | -| [replication\_group\_cluster\_mode](#input\_replication\_group\_cluster\_mode) | Specifies whether cluster mode is enabled or disabled. Valid values are enabled or disabled or compatible | `string` | `null` | no | | [replication\_group\_id](#input\_replication\_group\_id) | Replication group identifier. When `create_replication_group` is set to `true`, this is the ID assigned to the replication group created. When `create_replication_group` is set to `false`, this is the ID of an externally created replication group | `string` | `null` | no | | [security\_group\_description](#input\_security\_group\_description) | Description of the security group created | `string` | `null` | no | | [security\_group\_ids](#input\_security\_group\_ids) | One or more VPC security groups associated with the cache cluster | `list(string)` | `[]` | no | diff --git a/main.tf b/main.tf index 507db0c..f78027c 100644 --- a/main.tf +++ b/main.tf @@ -75,7 +75,7 @@ resource "aws_elasticache_replication_group" "this" { auth_token_update_strategy = var.auth_token_update_strategy auto_minor_version_upgrade = var.auto_minor_version_upgrade automatic_failover_enabled = var.multi_az_enabled || var.cluster_mode_enabled ? true : var.automatic_failover_enabled - cluster_mode = var.replication_group_cluster_mode + cluster_mode = var.cluster_mode data_tiering_enabled = var.data_tiering_enabled description = coalesce(var.description, "Replication group") engine = var.engine @@ -153,7 +153,7 @@ resource "aws_elasticache_replication_group" "global" { auth_token_update_strategy = var.auth_token_update_strategy auto_minor_version_upgrade = var.auto_minor_version_upgrade automatic_failover_enabled = var.multi_az_enabled || var.cluster_mode_enabled ? true : var.automatic_failover_enabled - cluster_mode = var.replication_group_cluster_mode + cluster_mode = var.cluster_mode data_tiering_enabled = var.data_tiering_enabled description = coalesce(var.description, "Global replication group") engine = var.create_secondary_global_replication_group ? null : var.engine diff --git a/variables.tf b/variables.tf index e4967ac..59649be 100644 --- a/variables.tf +++ b/variables.tf @@ -269,7 +269,7 @@ variable "replicas_per_node_group" { default = null } -variable "replication_group_cluster_mode" { +variable "cluster_mode" { description = "Specifies whether cluster mode is enabled or disabled. Valid values are enabled or disabled or compatible" type = string default = null From c9c7dbd677fbb61203f2228e08bd6cc3564237d0 Mon Sep 17 00:00:00 2001 From: magreenbaum Date: Tue, 15 Oct 2024 20:03:43 -0400 Subject: [PATCH 5/5] update README after upgrading local tfdocs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5abf425..dcbc37b 100644 --- a/README.md +++ b/README.md @@ -345,7 +345,7 @@ No modules. | [global\_replication\_group\_id](#input\_global\_replication\_group\_id) | The ID of the global replication group to which this replication group should belong | `string` | `null` | no | | [ip\_discovery](#input\_ip\_discovery) | The IP version to advertise in the discovery protocol. Valid values are `ipv4` or `ipv6` | `string` | `null` | no | | [kms\_key\_arn](#input\_kms\_key\_arn) | 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` | `null` | no | -| [log\_delivery\_configuration](#input\_log\_delivery\_configuration) | (Redis only) Specifies the destination and format of Redis SLOWLOG or Redis Engine Log | `any` |
{
"slow-log": {
"destination_type": "cloudwatch-logs",
"log_format": "json"
}
}
| no | +| [log\_delivery\_configuration](#input\_log\_delivery\_configuration) | (Redis only) Specifies the destination and format of Redis SLOWLOG or Redis Engine Log | `any` |
{
"slow-log": {
"destination_type": "cloudwatch-logs",
"log_format": "json"
}
}
| no | | [maintenance\_window](#input\_maintenance\_window) | Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC) | `string` | `null` | no | | [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` | `bool` | `false` | no | | [network\_type](#input\_network\_type) | The IP versions for cache cluster connections. Valid values are `ipv4`, `ipv6` or `dual_stack` | `string` | `null` | no |