From 289cbd5b7f0952c3356736b0e21af762115e5669 Mon Sep 17 00:00:00 2001 From: David Cheung Date: Tue, 22 Sep 2020 13:14:02 -0400 Subject: [PATCH] fix: modules with count to pick index first item --- modules/database/outputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/database/outputs.tf b/modules/database/outputs.tf index 7c14840..b4972c0 100644 --- a/modules/database/outputs.tf +++ b/modules/database/outputs.tf @@ -1,4 +1,4 @@ output "database_endpoint" { description = "The internal hostname used to connect to the database" - value = (var.database_engine == "postgres") ? module.rds_postgres.this_db_instance_endpoint : module.rds_mysql.this_db_instance_endpoint + value = (var.database_engine == "postgres") ? module.rds_postgres[0].this_db_instance_endpoint : module.rds_mysql[0].this_db_instance_endpoint }