| subcategory | Data Federation |
|---|
mongodbatlas_privatelink_endpoint_service_data_federation_online_archive provides a Private Endpoint Service resource for Data Federation and Online Archive. The resource allows you to create and manage a private endpoint for Federated Database Instances and Online Archives to the specified project.
-> NOTE: Groups and projects are synonymous terms. You may find groupId in the official documentation.
-> NOTE: Updates are limited to the comment argument.
resource "mongodbatlas_project" "atlas-project" {
org_id = var.atlas_org_id
name = var.atlas_project_name
}
resource "aws_vpc_endpoint" "test" {
vpc_id = "vpc-7fc0a543"
service_name = "<SERVICE-NAME>"
vpc_endpoint_type = "Interface"
subnet_ids = ["subnet-de0406d2"]
security_group_ids = ["sg-3f238186"]
}
resource "mongodbatlas_privatelink_endpoint_service_data_federation_online_archive" "test" {
project_id = mongodbatlas_project.atlas-project.id
endpoint_id = aws_vpc_endpoint.test.id
provider_name = "AWS"
comment = "Test"
region = "US_EAST_1"
customer_endpoint_dns_name = aws_vpc_endpoint.test.dns_entry[0].dns_name
}The service_name value for the region in question can be found in the MongoDB Atlas Administration documentation.
project_id(Required) - Unique 24-hexadecimal digit string that identifies your project.endpoint_id(Required) - Unique string that identifies the private endpoint. For AWS, this is a 22-character alphanumeric string (e.g.vpce-xxxxxxxxxxxxxxxxx). For Azure, this is the full resource ID of the private endpoint (e.g./subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}). See Atlas Data Federation supports AWS and Azure private endpoints using the PrivateLink feature.provider_name(Required) - Human-readable label that identifies the cloud service provider. AWS and Azure are currently supported.timeouts- (Optional) The duration to wait for the Private Endpoint Service resource for Data Federation and Online Archive to be created or deleted. The timeout value is specified in a signed sequence of decimal numbers followed by a time unit (e.g.,1h45m,300s,10m). Valid units are:ns,us(orµs),ms,s,m,h. The default timeout values for the following operations are:create(default:2h),delete(default:2h). Learn more about timeouts.region- Human-readable label to identify the region of VPC endpoint. Requires the Atlas region name, see the reference list for each provider. ForAWS, if defined, you must also specify a value forcustomer_endpoint_dns_name.customer_endpoint_dns_name- (Optional) Human-readable label to identify VPC endpoint DNS name in AWS. If defined, you must also specify a value forregion.customer_endpoint_ip_address: (Optional) IP address used to connect the Azure private endpoint.comment- (Optional) Human-readable string to associate with this private endpoint.
In addition to all arguments above, the following attributes are exported:
azure_link_id- Link ID that identifies the Azure private endpoint connection.error_message- Error message describing a failure approving the private endpoint request.status- Status of the private endpoint connection request.type- Human-readable label that identifies the resource type associated with this private endpoint.
Private Endpoint Service resource for Data Federation and Online Archive can be imported using project ID, endpoint ID, in the format project_id--endpoint_id, e.g.
$ terraform import mongodbatlas_privatelink_endpoint_service_data_federation_online_archive.example 1112222b3bf99403840e8934--vpce-3bf78b0ddee411ba1
See MongoDB Atlas API Documentation for more information.