Skip to content

Commit f90c78f

Browse files
committed
Update elasticache input variables
1 parent 9b217d0 commit f90c78f

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

elasticache-redis/replication-group/main.tf

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
resource "aws_elasticache_replication_group" "this" {
22
replication_group_id = coalesce(var.replication_group_id, var.name)
33

4-
at_rest_encryption_enabled = var.at_rest_encryption_enabled
5-
automatic_failover_enabled = local.replica_enabled
6-
description = var.description
7-
engine = var.engine
8-
engine_version = var.engine_version
9-
kms_key_id = local.primary_kms_key
10-
multi_az_enabled = local.replica_enabled
11-
node_type = var.node_type
12-
num_cache_clusters = local.instance_count
13-
parameter_group_name = var.parameter_group_name
14-
port = var.port
15-
security_group_ids = local.server_security_group_ids
16-
snapshot_name = var.snapshot_name
17-
snapshot_retention_limit = var.snapshot_retention_limit
18-
subnet_group_name = aws_elasticache_subnet_group.this.name
19-
transit_encryption_enabled = var.transit_encryption_enabled
4+
at_rest_encryption_enabled = var.at_rest_encryption_enabled
5+
automatic_failover_enabled = local.replica_enabled
6+
description = var.description
7+
engine = var.engine
8+
engine_version = var.engine_version
9+
global_replication_group_id = var.global_replication_group_id
10+
kms_key_id = local.primary_kms_key
11+
multi_az_enabled = local.replica_enabled
12+
node_type = var.node_type
13+
num_cache_clusters = local.instance_count
14+
parameter_group_name = var.parameter_group_name
15+
port = var.port
16+
security_group_ids = local.server_security_group_ids
17+
snapshot_name = var.snapshot_name
18+
snapshot_retention_limit = var.snapshot_retention_limit
19+
subnet_group_name = aws_elasticache_subnet_group.this.name
20+
transit_encryption_enabled = var.transit_encryption_enabled
2021

2122
# Auth tokens aren't supported without TLS
2223
auth_token = (

elasticache-redis/replication-group/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ variable "engine_version" {
3838
description = "Version for RDS database engine"
3939
}
4040

41+
variable "global_replication_group_id" {
42+
type = string
43+
description = "The ID of the global replication group to which this replication group should belong."
44+
default = null
45+
}
46+
4147
variable "initial_auth_token" {
4248
type = string
4349
description = "Override the initial auth token"

0 commit comments

Comments
 (0)