Skip to content

Commit 41e5c75

Browse files
authored
feat: Add elasticache cluster timeouts (#33)
1 parent 7d8b70b commit 41e5c75

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -366,14 +366,14 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
366366
| Name | Version |
367367
|------|---------|
368368
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
369-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.73 |
369+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.93 |
370370
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |
371371

372372
## Providers
373373

374374
| Name | Version |
375375
|------|---------|
376-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.73 |
376+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.93 |
377377
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |
378378

379379
## Modules
@@ -462,6 +462,7 @@ No modules.
462462
| <a name="input_subnet_group_name"></a> [subnet\_group\_name](#input\_subnet\_group\_name) | The name of the subnet group. If `create_subnet_group` is `true`, this is the name assigned to the subnet group created. Otherwise, this is the name of an existing subnet group | `string` | `null` | no |
463463
| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | List of VPC Subnet IDs for the Elasticache subnet group | `list(string)` | `[]` | no |
464464
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |
465+
| <a name="input_timeouts"></a> [timeouts](#input\_timeouts) | Define maximum timeout for creating, updating, and deleting cluster resource | `map(string)` | `{}` | no |
465466
| <a name="input_transit_encryption_enabled"></a> [transit\_encryption\_enabled](#input\_transit\_encryption\_enabled) | Enable encryption in-transit. Supported only with Memcached versions `1.6.12` and later, running in a VPC | `bool` | `true` | no |
466467
| <a name="input_transit_encryption_mode"></a> [transit\_encryption\_mode](#input\_transit\_encryption\_mode) | A setting that enables clients to migrate to in-transit encryption with no downtime. Valid values are preferred and required | `string` | `null` | no |
467468
| <a name="input_user_group_ids"></a> [user\_group\_ids](#input\_user\_group\_ids) | User Group ID to associate with the replication group. Only a maximum of one (1) user group ID is valid | `list(string)` | `null` | no |

examples/redis-cluster/main.tf

+6
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ module "elasticache" {
6464
]
6565

6666
tags = local.tags
67+
68+
timeouts = {
69+
create = "1h"
70+
update = "2h"
71+
delete = "1h"
72+
}
6773
}
6874

6975
module "elasticache_disabled" {

main.tf

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ resource "aws_elasticache_cluster" "this" {
6161
transit_encryption_enabled = var.engine == "memcached" ? var.transit_encryption_enabled : null
6262

6363
tags = local.tags
64+
65+
timeouts {
66+
create = try(var.timeouts.create, null)
67+
update = try(var.timeouts.update, null)
68+
delete = try(var.timeouts.delete, null)
69+
}
6470
}
6571

6672
################################################################################

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ variable "transit_encryption_mode" {
187187
default = null
188188
}
189189

190+
variable "timeouts" {
191+
description = "Define maximum timeout for creating, updating, and deleting cluster resource"
192+
type = map(string)
193+
default = {}
194+
}
195+
190196
################################################################################
191197
# Replication Group
192198
################################################################################

versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.73"
7+
version = ">= 5.93"
88
}
99
random = {
1010
source = "hashicorp/random"

0 commit comments

Comments
 (0)