From 2c9cecffac596c022194f610c9a0a1c64bdf557c Mon Sep 17 00:00:00 2001 From: Leonardo Jardim <68306312+leojaardim@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:15:02 -0300 Subject: [PATCH] fix: improvements (#2) --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 88bbab9..c235237 100644 --- a/main.tf +++ b/main.tf @@ -27,7 +27,7 @@ resource "aws_elasticache_replication_group" "this" { num_cache_clusters = var.num_cache_clusters engine = var.engine engine_version = var.engine_version - parameter_group_name = var.parameter_group_name + parameter_group_name = coalesce(var.parameter_group_name, var.replication_group_id) port = var.port preferred_cache_cluster_azs = var.preferred_cache_cluster_azs apply_immediately = var.apply_immediately @@ -75,7 +75,7 @@ module "elasticache_parameter_group" { create = var.create_elasticache_parameter_group - name = var.parameter_group_name + name = coalesce(var.parameter_group_name, var.replication_group_id) family = var.family description = var.description_parameter parameters = var.parameters