1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getEncryptionAtRestPrivateEndpoint
MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi

mongodbatlas.getEncryptionAtRestPrivateEndpoint

Explore with Pulumi AI

# Data Source: mongodbatlas.EncryptionAtRestPrivateEndpoint

mongodbatlas.EncryptionAtRestPrivateEndpoint describes a private endpoint used for encryption at rest using customer-managed keys.

Example Usage

S

NOTE: Only Azure Key Vault with Azure Private Link and AWS KMS over AWS PrivateLink is supported at this time.

Encryption At Rest Azure Key Vault Private Endpoint

To learn more, see Manage Customer Keys with Azure Key Vault Over Private Endpoints.

import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const single = mongodbatlas.getEncryptionAtRestPrivateEndpoint({
    projectId: atlasProjectId,
    cloudProvider: "AZURE",
    id: endpoint.id,
});
export const endpointConnectionName = single.then(single => single.privateEndpointConnectionName);
Copy
import pulumi
import pulumi_mongodbatlas as mongodbatlas

single = mongodbatlas.get_encryption_at_rest_private_endpoint(project_id=atlas_project_id,
    cloud_provider="AZURE",
    id=endpoint["id"])
pulumi.export("endpointConnectionName", single.private_endpoint_connection_name)
Copy
package main

import (
	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		single, err := mongodbatlas.LookupEncryptionAtRestPrivateEndpoint(ctx, &mongodbatlas.LookupEncryptionAtRestPrivateEndpointArgs{
			ProjectId:     atlasProjectId,
			CloudProvider: "AZURE",
			Id:            endpoint.Id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("endpointConnectionName", single.PrivateEndpointConnectionName)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var single = Mongodbatlas.GetEncryptionAtRestPrivateEndpoint.Invoke(new()
    {
        ProjectId = atlasProjectId,
        CloudProvider = "AZURE",
        Id = endpoint.Id,
    });

    return new Dictionary<string, object?>
    {
        ["endpointConnectionName"] = single.Apply(getEncryptionAtRestPrivateEndpointResult => getEncryptionAtRestPrivateEndpointResult.PrivateEndpointConnectionName),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetEncryptionAtRestPrivateEndpointArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var single = MongodbatlasFunctions.getEncryptionAtRestPrivateEndpoint(GetEncryptionAtRestPrivateEndpointArgs.builder()
            .projectId(atlasProjectId)
            .cloudProvider("AZURE")
            .id(endpoint.id())
            .build());

        ctx.export("endpointConnectionName", single.applyValue(getEncryptionAtRestPrivateEndpointResult -> getEncryptionAtRestPrivateEndpointResult.privateEndpointConnectionName()));
    }
}
Copy
variables:
  single:
    fn::invoke:
      function: mongodbatlas:getEncryptionAtRestPrivateEndpoint
      arguments:
        projectId: ${atlasProjectId}
        cloudProvider: AZURE
        id: ${endpoint.id}
outputs:
  endpointConnectionName: ${single.privateEndpointConnectionName}
Copy

Encryption At Rest AWS KMS Private Endpoint

import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const single = mongodbatlas.getEncryptionAtRestPrivateEndpoint({
    projectId: atlasProjectId,
    cloudProvider: "AWS",
    id: endpoint.id,
});
export const status = single.then(single => single.status);
Copy
import pulumi
import pulumi_mongodbatlas as mongodbatlas

single = mongodbatlas.get_encryption_at_rest_private_endpoint(project_id=atlas_project_id,
    cloud_provider="AWS",
    id=endpoint["id"])
pulumi.export("status", single.status)
Copy
package main

import (
	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		single, err := mongodbatlas.LookupEncryptionAtRestPrivateEndpoint(ctx, &mongodbatlas.LookupEncryptionAtRestPrivateEndpointArgs{
			ProjectId:     atlasProjectId,
			CloudProvider: "AWS",
			Id:            endpoint.Id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("status", single.Status)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var single = Mongodbatlas.GetEncryptionAtRestPrivateEndpoint.Invoke(new()
    {
        ProjectId = atlasProjectId,
        CloudProvider = "AWS",
        Id = endpoint.Id,
    });

    return new Dictionary<string, object?>
    {
        ["status"] = single.Apply(getEncryptionAtRestPrivateEndpointResult => getEncryptionAtRestPrivateEndpointResult.Status),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetEncryptionAtRestPrivateEndpointArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var single = MongodbatlasFunctions.getEncryptionAtRestPrivateEndpoint(GetEncryptionAtRestPrivateEndpointArgs.builder()
            .projectId(atlasProjectId)
            .cloudProvider("AWS")
            .id(endpoint.id())
            .build());

        ctx.export("status", single.applyValue(getEncryptionAtRestPrivateEndpointResult -> getEncryptionAtRestPrivateEndpointResult.status()));
    }
}
Copy
variables:
  single:
    fn::invoke:
      function: mongodbatlas:getEncryptionAtRestPrivateEndpoint
      arguments:
        projectId: ${atlasProjectId}
        cloudProvider: AWS
        id: ${endpoint.id}
outputs:
  status: ${single.status}
Copy

Using getEncryptionAtRestPrivateEndpoint

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getEncryptionAtRestPrivateEndpoint(args: GetEncryptionAtRestPrivateEndpointArgs, opts?: InvokeOptions): Promise<GetEncryptionAtRestPrivateEndpointResult>
function getEncryptionAtRestPrivateEndpointOutput(args: GetEncryptionAtRestPrivateEndpointOutputArgs, opts?: InvokeOptions): Output<GetEncryptionAtRestPrivateEndpointResult>
Copy
def get_encryption_at_rest_private_endpoint(cloud_provider: Optional[str] = None,
                                            id: Optional[str] = None,
                                            project_id: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetEncryptionAtRestPrivateEndpointResult
def get_encryption_at_rest_private_endpoint_output(cloud_provider: Optional[pulumi.Input[str]] = None,
                                            id: Optional[pulumi.Input[str]] = None,
                                            project_id: Optional[pulumi.Input[str]] = None,
                                            opts: Optional[InvokeOptions] = None) -> Output[GetEncryptionAtRestPrivateEndpointResult]
Copy
func LookupEncryptionAtRestPrivateEndpoint(ctx *Context, args *LookupEncryptionAtRestPrivateEndpointArgs, opts ...InvokeOption) (*LookupEncryptionAtRestPrivateEndpointResult, error)
func LookupEncryptionAtRestPrivateEndpointOutput(ctx *Context, args *LookupEncryptionAtRestPrivateEndpointOutputArgs, opts ...InvokeOption) LookupEncryptionAtRestPrivateEndpointResultOutput
Copy

> Note: This function is named LookupEncryptionAtRestPrivateEndpoint in the Go SDK.

public static class GetEncryptionAtRestPrivateEndpoint 
{
    public static Task<GetEncryptionAtRestPrivateEndpointResult> InvokeAsync(GetEncryptionAtRestPrivateEndpointArgs args, InvokeOptions? opts = null)
    public static Output<GetEncryptionAtRestPrivateEndpointResult> Invoke(GetEncryptionAtRestPrivateEndpointInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEncryptionAtRestPrivateEndpointResult> getEncryptionAtRestPrivateEndpoint(GetEncryptionAtRestPrivateEndpointArgs args, InvokeOptions options)
public static Output<GetEncryptionAtRestPrivateEndpointResult> getEncryptionAtRestPrivateEndpoint(GetEncryptionAtRestPrivateEndpointArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: mongodbatlas:index/getEncryptionAtRestPrivateEndpoint:getEncryptionAtRestPrivateEndpoint
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CloudProvider This property is required. string
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
Id This property is required. string
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project.
CloudProvider This property is required. string
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
Id This property is required. string
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project.
cloudProvider This property is required. String
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
id This property is required. String
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies your project.
cloudProvider This property is required. string
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
id This property is required. string
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
projectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project.
cloud_provider This property is required. str
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
id This property is required. str
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
project_id This property is required. str
Unique 24-hexadecimal digit string that identifies your project.
cloudProvider This property is required. String
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
id This property is required. String
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies your project.

getEncryptionAtRestPrivateEndpoint Result

The following output properties are available:

CloudProvider string
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
ErrorMessage string
Error message for failures associated with the Encryption At Rest private endpoint.
Id string
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
PrivateEndpointConnectionName string
Connection name of the Azure Private Endpoint.
ProjectId string
Unique 24-hexadecimal digit string that identifies your project.
RegionName string
Cloud provider region in which the Encryption At Rest private endpoint is located.
Status string
State of the Encryption At Rest private endpoint.
CloudProvider string
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
ErrorMessage string
Error message for failures associated with the Encryption At Rest private endpoint.
Id string
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
PrivateEndpointConnectionName string
Connection name of the Azure Private Endpoint.
ProjectId string
Unique 24-hexadecimal digit string that identifies your project.
RegionName string
Cloud provider region in which the Encryption At Rest private endpoint is located.
Status string
State of the Encryption At Rest private endpoint.
cloudProvider String
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
errorMessage String
Error message for failures associated with the Encryption At Rest private endpoint.
id String
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
privateEndpointConnectionName String
Connection name of the Azure Private Endpoint.
projectId String
Unique 24-hexadecimal digit string that identifies your project.
regionName String
Cloud provider region in which the Encryption At Rest private endpoint is located.
status String
State of the Encryption At Rest private endpoint.
cloudProvider string
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
errorMessage string
Error message for failures associated with the Encryption At Rest private endpoint.
id string
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
privateEndpointConnectionName string
Connection name of the Azure Private Endpoint.
projectId string
Unique 24-hexadecimal digit string that identifies your project.
regionName string
Cloud provider region in which the Encryption At Rest private endpoint is located.
status string
State of the Encryption At Rest private endpoint.
cloud_provider str
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
error_message str
Error message for failures associated with the Encryption At Rest private endpoint.
id str
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
private_endpoint_connection_name str
Connection name of the Azure Private Endpoint.
project_id str
Unique 24-hexadecimal digit string that identifies your project.
region_name str
Cloud provider region in which the Encryption At Rest private endpoint is located.
status str
State of the Encryption At Rest private endpoint.
cloudProvider String
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
errorMessage String
Error message for failures associated with the Encryption At Rest private endpoint.
id String
Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.
privateEndpointConnectionName String
Connection name of the Azure Private Endpoint.
projectId String
Unique 24-hexadecimal digit string that identifies your project.
regionName String
Cloud provider region in which the Encryption At Rest private endpoint is located.
status String
State of the Encryption At Rest private endpoint.

Package Details

Repository
MongoDB Atlas pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes
This Pulumi package is based on the mongodbatlas Terraform Provider.