From 20481ffa276d4078a07422bc8ee3eb6098b5d528 Mon Sep 17 00:00:00 2001 From: sj-williams Date: Fri, 23 Aug 2024 11:08:52 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20fix=20conditional=20che?= =?UTF-8?q?ck=20for=20replica=20db=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit chore: 🤖 wip chore: 🤖 wip --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 0756b96..0cf1002 100644 --- a/main.tf +++ b/main.tf @@ -148,9 +148,9 @@ resource "aws_db_instance" "rds" { max_allocated_storage = var.db_max_allocated_storage apply_immediately = true engine = var.replicate_source_db == null ? var.db_engine : null - engine_version = var.replicate_source_db == null ? var.db_engine_version : null + engine_version = var.db_engine_version instance_class = var.db_instance_class - db_name = can(regex("sqlserver", var.db_engine)) ? null : local.db_name + db_name = var.replicate_source_db != null || can(regex("sqlserver", var.db_engine)) ? null : local.db_name username = var.replicate_source_db != null ? null : sensitive("cp${random_string.username.result}") password = var.replicate_source_db != null ? null : random_password.password.result backup_retention_period = var.db_backup_retention_period