Skip to content

Commit 5694400

Browse files
committed
fix: docs, add examples and fix formatting
1 parent fea701e commit 5694400

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ No modules.
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 |
465465
| <a name="input_timeouts"></a> [timeouts](#input\_timeouts) | Define maximum timeout for creating, updating, and deleting cluster resource | `map(string)` | `{}` | no |
466-
| <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 |
466+
| <a name="input_transit_encryption_enabled"></a> [transit\_encryption\_enabled](#input\_transit\_encryption\_enabled) | Enable encryption in-transit. | `bool` | `null` | no |
467467
| <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 |
468468
| <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 |
469469
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | Identifier of the VPC where the security group will be created | `string` | `null` | no |

examples/redis-replication-group/main.tf

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ module "elasticache" {
3030
engine_version = "7.1"
3131
node_type = "cache.t4g.small"
3232

33-
transit_encryption_enabled = true
34-
auth_token = "PickSomethingMoreSecure123!"
35-
maintenance_window = "sun:05:00-sun:09:00"
36-
apply_immediately = true
33+
auth_token = "PickSomethingMoreSecure123!"
34+
maintenance_window = "sun:05:00-sun:09:00"
35+
apply_immediately = true
3736

3837
# Security Group
3938
vpc_id = module.vpc.vpc_id
@@ -63,6 +62,10 @@ module "elasticache" {
6362
}
6463
]
6564

65+
# enable encryption in-transit
66+
transit_encryption_enabled = true
67+
transit_encryption_mode = "preferred"
68+
6669
tags = local.tags
6770
}
6871

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ resource "aws_elasticache_cluster" "this" {
5959
snapshot_window = local.in_replication_group ? null : var.snapshot_window
6060
subnet_group_name = local.in_replication_group ? null : local.subnet_group_name
6161
# this makes it so that the transit encryption is enabled by default for memcached, which prevents a backwards incompatible change
62-
transit_encryption_enabled = var.engine == "memcached" ? true : var.transit_encryption_enabled
62+
transit_encryption_enabled = var.engine == "memcached" ? true : var.transit_encryption_enabled
6363

6464
tags = local.tags
6565

0 commit comments

Comments
 (0)