Skip to content

Commit e6f5604

Browse files
coderGo93Edgar López
andauthored
INTMDB-174: updated an example for cluster (#400)
* docs: updated example for return a connection string in cluster * docs: added example for azure connection strings Co-authored-by: Edgar López <[email protected]>
1 parent 9ea546e commit e6f5604

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

website/docs/r/cluster.html.markdown

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,17 @@ resource "mongodbatlas_cluster" "cluster-test" {
207207
}
208208
```
209209
### Example - Return a Connection String
210+
AWS
210211
```hcl
211212
output "plstring" {
212-
value = lookup(mongodbatlas_cluster.cluster-test.connection_strings[0].aws_private_link_srv, aws_vpc_endpoint.ptfe_service.id)
213+
value = lookup(mongodbatlas_cluster.cluster-test.connection_strings[0].private_endpoint[0].srv_connection_string, aws_vpc_endpoint.ptfe_service.id)
214+
}
215+
//Example return string: plstring = mongodb+srv://cluster-atlas-pl-0.za3fb.mongodb.net
216+
```
217+
Azure
218+
```hcl
219+
output "plstring" {
220+
value = lookup(mongodbatlas_cluster.cluster-test.connection_strings[0].private_endpoint[0].srv_connection_string, azurerm_private_endpoint.test.id)
213221
}
214222
//Example return string: plstring = mongodb+srv://cluster-atlas-pl-0.za3fb.mongodb.net
215223
```

0 commit comments

Comments
 (0)