Skip to content

Commit ccd140f

Browse files
authored
Update magenx.tf
1 parent 929907f commit ccd140f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

magenx.tf

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,18 @@ resource "aws_mq_broker" "this" {
545545

546546
//////////////////////////////////////////////////////////[ ELASTICACHE ]/////////////////////////////////////////////////
547547

548+
# # ---------------------------------------------------------------------------------------------------------------------#
549+
# Create ElastiCache parameter groups
550+
# # ---------------------------------------------------------------------------------------------------------------------#
551+
resource "aws_elasticache_parameter_group" "this" {
552+
for_each = toset(var.redis["name"])
553+
name = "${var.app["brand"]}-${each.key}-parameter"
554+
family = "redis6.x"
555+
description = "Parameter group for ${var.app["domain"]} ${each.key} backend"
556+
tags = {
557+
Name = "${var.app["brand"]}-${each.key}-parameter"
558+
}
559+
}
548560
# # ---------------------------------------------------------------------------------------------------------------------#
549561
# Create ElastiCache - Redis Replication group - session + cache
550562
# # ---------------------------------------------------------------------------------------------------------------------#
@@ -556,7 +568,7 @@ resource "aws_elasticache_replication_group" "this" {
556568
replication_group_description = "Replication group for ${var.app["domain"]} ${each.key} backend"
557569
node_type = var.redis["node_type"]
558570
port = 6379
559-
parameter_group_name = var.redis["parameter_group_name"]
571+
parameter_group_name = aws_elasticache_parameter_group.this[each.key].id
560572
security_group_ids = [aws_security_group.this[each.key].id]
561573
subnet_group_name = aws_elasticache_subnet_group.this.name
562574
automatic_failover_enabled = var.redis["automatic_failover_enabled"]

0 commit comments

Comments
 (0)