@@ -12,7 +12,7 @@ description: |-
12
12
13
13
-> ** NOTE:** Groups and projects are synonymous terms. You may find group_id in the official documentation.
14
14
15
- ## Example Usage
15
+ ## Example with AWS
16
16
17
17
``` hcl
18
18
resource "mongodbatlas_privatelink_endpoint" "test" {
@@ -30,10 +30,48 @@ resource "aws_vpc_endpoint" "ptfe_service" {
30
30
}
31
31
32
32
resource "mongodbatlas_privatelink_endpoint_service" "test" {
33
- project_id = mongodbatlas_privatelink_endpoint.test.project_id
34
- private_link_id = mongodbatlas_privatelink_endpoint.test.private_link_id
35
- endpoint_service_id = aws_vpc_endpoint.ptfe_service.id
36
- provider_name ="AWS"
33
+ project_id = mongodbatlas_privatelink_endpoint.test.project_id
34
+ private_link_id = mongodbatlas_privatelink_endpoint.test.private_link_id
35
+ endpoint_service_id = aws_vpc_endpoint.ptfe_service.id
36
+ provider_name = "AWS"
37
+ }
38
+
39
+ data "mongodbatlas_privatelink_endpoint_service" "test" {
40
+ project_id = mongodbatlas_privatelink_endpoint_service.test.project_id
41
+ private_link_id = mongodbatlas_privatelink_endpoint_service.test.private_link_id
42
+ interface_endpoint_id = mongodbatlas_privatelink_endpoint_service.test.interface_endpoint_id
43
+ }
44
+ ```
45
+
46
+ ## Example with Azure
47
+
48
+ ``` hcl
49
+ resource "mongodbatlas_privatelink_endpoint" "test" {
50
+ project_id = var.project_id
51
+ provider_name = "AZURE"
52
+ region = "eastus2"
53
+ }
54
+
55
+ resource "azurerm_private_endpoint" "test" {
56
+ name = "endpoint-test"
57
+ location = data.azurerm_resource_group.test.location
58
+ resource_group_name = var.resource_group_name
59
+ subnet_id = azurerm_subnet.test.id
60
+ private_service_connection {
61
+ name = mongodbatlas_privatelink_endpoint.test.private_link_service_name
62
+ private_connection_resource_id = mongodbatlas_privatelink_endpoint.test.private_link_service_resource_id
63
+ is_manual_connection = true
64
+ request_message = "Azure Private Link test"
65
+ }
66
+
67
+ }
68
+
69
+ resource "mongodbatlas_privatelink_endpoint_service" "test" {
70
+ project_id = mongodbatlas_privatelink_endpoint.test.project_id
71
+ private_link_id = mongodbatlas_privatelink_endpoint.test.private_link_id
72
+ endpoint_service_id = azurerm_private_endpoint.test.id
73
+ private_endpoint_ip_address = azurerm_private_endpoint.test.private_service_connection.0.private_ip_address
74
+ provider_name = "AZURE"
37
75
}
38
76
39
77
data "mongodbatlas_privatelink_endpoint_service" "test" {
0 commit comments