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 }