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

mongodbatlas.getEncryptionAtRestPrivateEndpoints

Explore with Pulumi AI

# Data Source: mongodbatlas.getEncryptionAtRestPrivateEndpoints

mongodbatlas.getEncryptionAtRestPrivateEndpoints describes private endpoints of a particular cloud provider 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 about existing limitations, see Manage Customer Keys with Azure Key Vault Over Private Endpoints.

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

const plural = mongodbatlas.getEncryptionAtRestPrivateEndpoints({
    projectId: atlasProjectId,
    cloudProvider: "AZURE",
});
export const numberOfEndpoints = plural.then(plural => plural.results).length;
Copy
import pulumi
import pulumi_mongodbatlas as mongodbatlas

plural = mongodbatlas.get_encryption_at_rest_private_endpoints(project_id=atlas_project_id,
    cloud_provider="AZURE")
pulumi.export("numberOfEndpoints", len(plural.results))
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 {
		plural, err := mongodbatlas.LookupEncryptionAtRestPrivateEndpoints(ctx, &mongodbatlas.LookupEncryptionAtRestPrivateEndpointsArgs{
			ProjectId:     atlasProjectId,
			CloudProvider: "AZURE",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("numberOfEndpoints", pulumi.Int(len(plural.Results)))
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var plural = Mongodbatlas.GetEncryptionAtRestPrivateEndpoints.Invoke(new()
    {
        ProjectId = atlasProjectId,
        CloudProvider = "AZURE",
    });

    return new Dictionary<string, object?>
    {
        ["numberOfEndpoints"] = plural.Apply(getEncryptionAtRestPrivateEndpointsResult => getEncryptionAtRestPrivateEndpointsResult.Results).Length,
    };
});
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.GetEncryptionAtRestPrivateEndpointsArgs;
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 plural = MongodbatlasFunctions.getEncryptionAtRestPrivateEndpoints(GetEncryptionAtRestPrivateEndpointsArgs.builder()
            .projectId(atlasProjectId)
            .cloudProvider("AZURE")
            .build());

        ctx.export("numberOfEndpoints", plural.applyValue(getEncryptionAtRestPrivateEndpointsResult -> getEncryptionAtRestPrivateEndpointsResult.results()).length());
    }
}
Copy
Coming soon!

Encryption At Rest AWS KMS Private Endpoint

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

const plural = mongodbatlas.getEncryptionAtRestPrivateEndpoints({
    projectId: atlasProjectId,
    cloudProvider: "AWS",
});
export const numberOfEndpoints = plural.then(plural => plural.results).length;
Copy
import pulumi
import pulumi_mongodbatlas as mongodbatlas

plural = mongodbatlas.get_encryption_at_rest_private_endpoints(project_id=atlas_project_id,
    cloud_provider="AWS")
pulumi.export("numberOfEndpoints", len(plural.results))
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 {
		plural, err := mongodbatlas.LookupEncryptionAtRestPrivateEndpoints(ctx, &mongodbatlas.LookupEncryptionAtRestPrivateEndpointsArgs{
			ProjectId:     atlasProjectId,
			CloudProvider: "AWS",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("numberOfEndpoints", pulumi.Int(len(plural.Results)))
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var plural = Mongodbatlas.GetEncryptionAtRestPrivateEndpoints.Invoke(new()
    {
        ProjectId = atlasProjectId,
        CloudProvider = "AWS",
    });

    return new Dictionary<string, object?>
    {
        ["numberOfEndpoints"] = plural.Apply(getEncryptionAtRestPrivateEndpointsResult => getEncryptionAtRestPrivateEndpointsResult.Results).Length,
    };
});
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.GetEncryptionAtRestPrivateEndpointsArgs;
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 plural = MongodbatlasFunctions.getEncryptionAtRestPrivateEndpoints(GetEncryptionAtRestPrivateEndpointsArgs.builder()
            .projectId(atlasProjectId)
            .cloudProvider("AWS")
            .build());

        ctx.export("numberOfEndpoints", plural.applyValue(getEncryptionAtRestPrivateEndpointsResult -> getEncryptionAtRestPrivateEndpointsResult.results()).length());
    }
}
Copy
Coming soon!

Using getEncryptionAtRestPrivateEndpoints

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 getEncryptionAtRestPrivateEndpoints(args: GetEncryptionAtRestPrivateEndpointsArgs, opts?: InvokeOptions): Promise<GetEncryptionAtRestPrivateEndpointsResult>
function getEncryptionAtRestPrivateEndpointsOutput(args: GetEncryptionAtRestPrivateEndpointsOutputArgs, opts?: InvokeOptions): Output<GetEncryptionAtRestPrivateEndpointsResult>
Copy
def get_encryption_at_rest_private_endpoints(cloud_provider: Optional[str] = None,
                                             project_id: Optional[str] = None,
                                             opts: Optional[InvokeOptions] = None) -> GetEncryptionAtRestPrivateEndpointsResult
def get_encryption_at_rest_private_endpoints_output(cloud_provider: Optional[pulumi.Input[str]] = None,
                                             project_id: Optional[pulumi.Input[str]] = None,
                                             opts: Optional[InvokeOptions] = None) -> Output[GetEncryptionAtRestPrivateEndpointsResult]
Copy
func LookupEncryptionAtRestPrivateEndpoints(ctx *Context, args *LookupEncryptionAtRestPrivateEndpointsArgs, opts ...InvokeOption) (*LookupEncryptionAtRestPrivateEndpointsResult, error)
func LookupEncryptionAtRestPrivateEndpointsOutput(ctx *Context, args *LookupEncryptionAtRestPrivateEndpointsOutputArgs, opts ...InvokeOption) LookupEncryptionAtRestPrivateEndpointsResultOutput
Copy

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

public static class GetEncryptionAtRestPrivateEndpoints 
{
    public static Task<GetEncryptionAtRestPrivateEndpointsResult> InvokeAsync(GetEncryptionAtRestPrivateEndpointsArgs args, InvokeOptions? opts = null)
    public static Output<GetEncryptionAtRestPrivateEndpointsResult> Invoke(GetEncryptionAtRestPrivateEndpointsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEncryptionAtRestPrivateEndpointsResult> getEncryptionAtRestPrivateEndpoints(GetEncryptionAtRestPrivateEndpointsArgs args, InvokeOptions options)
public static Output<GetEncryptionAtRestPrivateEndpointsResult> getEncryptionAtRestPrivateEndpoints(GetEncryptionAtRestPrivateEndpointsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: mongodbatlas:index/getEncryptionAtRestPrivateEndpoints:getEncryptionAtRestPrivateEndpoints
  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.
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.
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.
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.
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.
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.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies your project.

getEncryptionAtRestPrivateEndpoints Result

The following output properties are available:

CloudProvider string
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Unique 24-hexadecimal digit string that identifies your project.
Results List<GetEncryptionAtRestPrivateEndpointsResult>
List of documents that MongoDB Cloud returns for this request.
CloudProvider string
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Unique 24-hexadecimal digit string that identifies your project.
Results []GetEncryptionAtRestPrivateEndpointsResult
List of documents that MongoDB Cloud returns for this request.
cloudProvider String
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
id String
The provider-assigned unique ID for this managed resource.
projectId String
Unique 24-hexadecimal digit string that identifies your project.
results List<GetEncryptionAtRestPrivateEndpointsResult>
List of documents that MongoDB Cloud returns for this request.
cloudProvider string
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
id string
The provider-assigned unique ID for this managed resource.
projectId string
Unique 24-hexadecimal digit string that identifies your project.
results GetEncryptionAtRestPrivateEndpointsResult[]
List of documents that MongoDB Cloud returns for this request.
cloud_provider str
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
id str
The provider-assigned unique ID for this managed resource.
project_id str
Unique 24-hexadecimal digit string that identifies your project.
results Sequence[GetEncryptionAtRestPrivateEndpointsResult]
List of documents that MongoDB Cloud returns for this request.
cloudProvider String
Label that identifies the cloud provider for the Encryption At Rest private endpoint.
id String
The provider-assigned unique ID for this managed resource.
projectId String
Unique 24-hexadecimal digit string that identifies your project.
results List<Property Map>
List of documents that MongoDB Cloud returns for this request.

Supporting Types

GetEncryptionAtRestPrivateEndpointsResult

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