From ac78c8a5b45504d28adbadaca71b605018973afe Mon Sep 17 00:00:00 2001 From: Garland Kan Date: Thu, 20 Jan 2022 16:38:24 -0800 Subject: [PATCH] Mongo outputs (#243) --- terraform-modules/aws/mongodb-atlas/outputs.tf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/terraform-modules/aws/mongodb-atlas/outputs.tf b/terraform-modules/aws/mongodb-atlas/outputs.tf index 974a8187a..1ebc6fbfc 100644 --- a/terraform-modules/aws/mongodb-atlas/outputs.tf +++ b/terraform-modules/aws/mongodb-atlas/outputs.tf @@ -17,3 +17,12 @@ output "name" { output "service_endpoint_dns" { value = aws_vpc_endpoint.mongodbatlas.dns_entry[0]["dns_name"] } + +# https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/cluster#example---return-a-connection-string +output "connect_string_aws_private_endpoint" { + value = mongodbatlas_cluster.cluster.connection_strings[0].private_endpoint[0].srv_connection_string +} + +output "connect_string_standard" { + value = mongodbatlas_cluster.cluster.connection_strings[0].standard +}