Skip to content

Commit 1ec4687

Browse files
authored
Merge pull request #2 from hazelops/feature/multi-az-enabling
Multi-AZ Support
2 parents be2627d + 1288372 commit 1ec4687

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ resource "aws_elasticache_replication_group" "default" {
6464
# https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html
6565
automatic_failover_enabled = var.automatic_failover_enabled
6666

67+
# (Optional) Specifies whether to enable Multi-AZ Support for the replication group.
68+
# If true, automatic_failover_enabled must also be enabled. Defaults to false
69+
multi_az_enabled = var.multi_az_enabled
70+
6771
# Redis at-rest encryption is an optional feature to increase data security by encrypting on-disk data during sync
6872
# and backup or snapshot operations. Because there is some processing needed to encrypt and decrypt the data,
6973
# enabling at-rest encryption can have some performance impact during these operations.

outputs.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ output "elasticache_replication_group_primary_endpoint_address" {
99
}
1010

1111
output "elasticache_replication_group_member_clusters" {
12-
value = join("", aws_elasticache_replication_group.default.member_clusters)
12+
value = aws_elasticache_replication_group.default.member_clusters
1313
description = "The identifiers of all the nodes that are part of this replication group."
1414
}
1515

@@ -49,11 +49,11 @@ output "security_group_description" {
4949
}
5050

5151
output "security_group_ingress" {
52-
value = join("", aws_security_group.default.ingress)
52+
value = aws_security_group.default.ingress
5353
description = "The ingress rules of the Redis ElastiCache security group."
5454
}
5555

5656
output "security_group_egress" {
57-
value = join("", aws_security_group.default.egress)
57+
value = aws_security_group.default.egress
5858
description = "The egress rules of the Redis ElastiCache security group."
5959
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ variable "automatic_failover_enabled" {
6464
description = "Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails."
6565
}
6666

67+
variable "multi_az_enabled" {
68+
default = false
69+
type = bool
70+
description = "Specifies whether to enable Multi-AZ Support for the replication group. If true, automatic_failover_enabled must also be enabled."
71+
}
72+
6773
variable "at_rest_encryption_enabled" {
6874
default = true
6975
type = bool

0 commit comments

Comments
 (0)