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

mongodbatlas.getServerlessInstances

Explore with Pulumi AI

WARNING: This data source is deprecated and will be removed in January 2026. For more details, see Migration Guide: Transition out of Serverless Instances and Shared-tier clusters.

mongodbatlas.getServerlessInstances describes all serverless instances. This represents serverless instances that have been created for the specified group id.

NOTE: Serverless instances do not support some Atlas features at this time. For a full list of unsupported features, see Serverless Instance Limitations.

NOTE: Groups and projects are synonymous terms. You may find groupId in the official documentation.

Example Usage

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

const dataServerless = mongodbatlas.getServerlessInstances({
    projectId: "<PROJECT_ID",
});
Copy
import pulumi
import pulumi_mongodbatlas as mongodbatlas

data_serverless = mongodbatlas.get_serverless_instances(project_id="<PROJECT_ID")
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 {
		_, err := mongodbatlas.LookupServerlessInstances(ctx, &mongodbatlas.LookupServerlessInstancesArgs{
			ProjectId: "<PROJECT_ID",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var dataServerless = Mongodbatlas.GetServerlessInstances.Invoke(new()
    {
        ProjectId = "<PROJECT_ID",
    });

});
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.GetServerlessInstancesArgs;
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 dataServerless = MongodbatlasFunctions.getServerlessInstances(GetServerlessInstancesArgs.builder()
            .projectId("<PROJECT_ID")
            .build());

    }
}
Copy
variables:
  dataServerless:
    fn::invoke:
      function: mongodbatlas:getServerlessInstances
      arguments:
        projectId: <PROJECT_ID
Copy

Using getServerlessInstances

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 getServerlessInstances(args: GetServerlessInstancesArgs, opts?: InvokeOptions): Promise<GetServerlessInstancesResult>
function getServerlessInstancesOutput(args: GetServerlessInstancesOutputArgs, opts?: InvokeOptions): Output<GetServerlessInstancesResult>
Copy
def get_serverless_instances(project_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetServerlessInstancesResult
def get_serverless_instances_output(project_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetServerlessInstancesResult]
Copy
func LookupServerlessInstances(ctx *Context, args *LookupServerlessInstancesArgs, opts ...InvokeOption) (*LookupServerlessInstancesResult, error)
func LookupServerlessInstancesOutput(ctx *Context, args *LookupServerlessInstancesOutputArgs, opts ...InvokeOption) LookupServerlessInstancesResultOutput
Copy

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

public static class GetServerlessInstances 
{
    public static Task<GetServerlessInstancesResult> InvokeAsync(GetServerlessInstancesArgs args, InvokeOptions? opts = null)
    public static Output<GetServerlessInstancesResult> Invoke(GetServerlessInstancesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetServerlessInstancesResult> getServerlessInstances(GetServerlessInstancesArgs args, InvokeOptions options)
public static Output<GetServerlessInstancesResult> getServerlessInstances(GetServerlessInstancesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: mongodbatlas:index/getServerlessInstances:getServerlessInstances
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ProjectId This property is required. string
Unique identifier for the project that contains the specified cluster.
ProjectId This property is required. string
Unique identifier for the project that contains the specified cluster.
projectId This property is required. String
Unique identifier for the project that contains the specified cluster.
projectId This property is required. string
Unique identifier for the project that contains the specified cluster.
project_id This property is required. str
Unique identifier for the project that contains the specified cluster.
projectId This property is required. String
Unique identifier for the project that contains the specified cluster.

getServerlessInstances Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Results List<GetServerlessInstancesResult>
A list where each result represents a Serverless Instance. To learn more, see Serverless Instance.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Results []GetServerlessInstancesResult
A list where each result represents a Serverless Instance. To learn more, see Serverless Instance.
id String
The provider-assigned unique ID for this managed resource.
projectId String
results List<GetServerlessInstancesResult>
A list where each result represents a Serverless Instance. To learn more, see Serverless Instance.
id string
The provider-assigned unique ID for this managed resource.
projectId string
results GetServerlessInstancesResult[]
A list where each result represents a Serverless Instance. To learn more, see Serverless Instance.
id str
The provider-assigned unique ID for this managed resource.
project_id str
results Sequence[GetServerlessInstancesResult]
A list where each result represents a Serverless Instance. To learn more, see Serverless Instance.
id String
The provider-assigned unique ID for this managed resource.
projectId String
results List<Property Map>
A list where each result represents a Serverless Instance. To learn more, see Serverless Instance.

Supporting Types

GetServerlessInstancesResult

AutoIndexing This property is required. bool
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Auto Indexing.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

ConnectionStringsPrivateEndpointSrvs This property is required. List<string>
ConnectionStringsStandardSrv This property is required. string
Public mongodb+srv:// connection string that you can use to connect to this serverless instance.
ContinuousBackupEnabled This property is required. bool
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Continuous Backup.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

CreateDate This property is required. string
Id This property is required. string
Unique 24-hexadecimal digit string that identifies the serverless instance.
Links This property is required. List<GetServerlessInstancesResultLink>
MongoDbVersion This property is required. string
Version of MongoDB that the serverless instance runs, in <major version>.<minor version> format.
Name This property is required. string
(Required) Human-readable label that identifies your serverless instance.
ProjectId This property is required. string
Unique identifier for the project that contains the specified cluster.
ProviderSettingsBackingProviderName This property is required. string
Cloud service provider on which MongoDB Cloud provisioned the serverless instance.
ProviderSettingsProviderName This property is required. string
Cloud service provider that applies to the provisioned the serverless instance.
ProviderSettingsRegionName This property is required. string
Human-readable label that identifies the physical location of your MongoDB serverless instance. The region you choose can affect network latency for clients accessing your databases.
StateName This property is required. string
Stage of deployment of this serverless instance when the resource made its request.
Tags This property is required. List<GetServerlessInstancesResultTag>
Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See below.
TerminationProtectionEnabled This property is required. bool
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
AutoIndexing This property is required. bool
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Auto Indexing.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

ConnectionStringsPrivateEndpointSrvs This property is required. []string
ConnectionStringsStandardSrv This property is required. string
Public mongodb+srv:// connection string that you can use to connect to this serverless instance.
ContinuousBackupEnabled This property is required. bool
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Continuous Backup.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

CreateDate This property is required. string
Id This property is required. string
Unique 24-hexadecimal digit string that identifies the serverless instance.
Links This property is required. []GetServerlessInstancesResultLink
MongoDbVersion This property is required. string
Version of MongoDB that the serverless instance runs, in <major version>.<minor version> format.
Name This property is required. string
(Required) Human-readable label that identifies your serverless instance.
ProjectId This property is required. string
Unique identifier for the project that contains the specified cluster.
ProviderSettingsBackingProviderName This property is required. string
Cloud service provider on which MongoDB Cloud provisioned the serverless instance.
ProviderSettingsProviderName This property is required. string
Cloud service provider that applies to the provisioned the serverless instance.
ProviderSettingsRegionName This property is required. string
Human-readable label that identifies the physical location of your MongoDB serverless instance. The region you choose can affect network latency for clients accessing your databases.
StateName This property is required. string
Stage of deployment of this serverless instance when the resource made its request.
Tags This property is required. []GetServerlessInstancesResultTag
Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See below.
TerminationProtectionEnabled This property is required. bool
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
autoIndexing This property is required. Boolean
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Auto Indexing.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

connectionStringsPrivateEndpointSrvs This property is required. List<String>
connectionStringsStandardSrv This property is required. String
Public mongodb+srv:// connection string that you can use to connect to this serverless instance.
continuousBackupEnabled This property is required. Boolean
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Continuous Backup.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

createDate This property is required. String
id This property is required. String
Unique 24-hexadecimal digit string that identifies the serverless instance.
links This property is required. List<GetServerlessInstancesResultLink>
mongoDbVersion This property is required. String
Version of MongoDB that the serverless instance runs, in <major version>.<minor version> format.
name This property is required. String
(Required) Human-readable label that identifies your serverless instance.
projectId This property is required. String
Unique identifier for the project that contains the specified cluster.
providerSettingsBackingProviderName This property is required. String
Cloud service provider on which MongoDB Cloud provisioned the serverless instance.
providerSettingsProviderName This property is required. String
Cloud service provider that applies to the provisioned the serverless instance.
providerSettingsRegionName This property is required. String
Human-readable label that identifies the physical location of your MongoDB serverless instance. The region you choose can affect network latency for clients accessing your databases.
stateName This property is required. String
Stage of deployment of this serverless instance when the resource made its request.
tags This property is required. List<GetServerlessInstancesResultTag>
Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See below.
terminationProtectionEnabled This property is required. Boolean
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
autoIndexing This property is required. boolean
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Auto Indexing.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

connectionStringsPrivateEndpointSrvs This property is required. string[]
connectionStringsStandardSrv This property is required. string
Public mongodb+srv:// connection string that you can use to connect to this serverless instance.
continuousBackupEnabled This property is required. boolean
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Continuous Backup.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

createDate This property is required. string
id This property is required. string
Unique 24-hexadecimal digit string that identifies the serverless instance.
links This property is required. GetServerlessInstancesResultLink[]
mongoDbVersion This property is required. string
Version of MongoDB that the serverless instance runs, in <major version>.<minor version> format.
name This property is required. string
(Required) Human-readable label that identifies your serverless instance.
projectId This property is required. string
Unique identifier for the project that contains the specified cluster.
providerSettingsBackingProviderName This property is required. string
Cloud service provider on which MongoDB Cloud provisioned the serverless instance.
providerSettingsProviderName This property is required. string
Cloud service provider that applies to the provisioned the serverless instance.
providerSettingsRegionName This property is required. string
Human-readable label that identifies the physical location of your MongoDB serverless instance. The region you choose can affect network latency for clients accessing your databases.
stateName This property is required. string
Stage of deployment of this serverless instance when the resource made its request.
tags This property is required. GetServerlessInstancesResultTag[]
Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See below.
terminationProtectionEnabled This property is required. boolean
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
auto_indexing This property is required. bool
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Auto Indexing.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

connection_strings_private_endpoint_srvs This property is required. Sequence[str]
connection_strings_standard_srv This property is required. str
Public mongodb+srv:// connection string that you can use to connect to this serverless instance.
continuous_backup_enabled This property is required. bool
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Continuous Backup.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

create_date This property is required. str
id This property is required. str
Unique 24-hexadecimal digit string that identifies the serverless instance.
links This property is required. Sequence[GetServerlessInstancesResultLink]
mongo_db_version This property is required. str
Version of MongoDB that the serverless instance runs, in <major version>.<minor version> format.
name This property is required. str
(Required) Human-readable label that identifies your serverless instance.
project_id This property is required. str
Unique identifier for the project that contains the specified cluster.
provider_settings_backing_provider_name This property is required. str
Cloud service provider on which MongoDB Cloud provisioned the serverless instance.
provider_settings_provider_name This property is required. str
Cloud service provider that applies to the provisioned the serverless instance.
provider_settings_region_name This property is required. str
Human-readable label that identifies the physical location of your MongoDB serverless instance. The region you choose can affect network latency for clients accessing your databases.
state_name This property is required. str
Stage of deployment of this serverless instance when the resource made its request.
tags This property is required. Sequence[GetServerlessInstancesResultTag]
Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See below.
termination_protection_enabled This property is required. bool
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
autoIndexing This property is required. Boolean
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Auto Indexing.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

connectionStringsPrivateEndpointSrvs This property is required. List<String>
connectionStringsStandardSrv This property is required. String
Public mongodb+srv:// connection string that you can use to connect to this serverless instance.
continuousBackupEnabled This property is required. Boolean
(Deprecated) Flag that indicates whether the serverless instance uses Serverless Continuous Backup.

Deprecated: This parameter is deprecated and will be removed in March 2025. For more details see https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide.

createDate This property is required. String
id This property is required. String
Unique 24-hexadecimal digit string that identifies the serverless instance.
links This property is required. List<Property Map>
mongoDbVersion This property is required. String
Version of MongoDB that the serverless instance runs, in <major version>.<minor version> format.
name This property is required. String
(Required) Human-readable label that identifies your serverless instance.
projectId This property is required. String
Unique identifier for the project that contains the specified cluster.
providerSettingsBackingProviderName This property is required. String
Cloud service provider on which MongoDB Cloud provisioned the serverless instance.
providerSettingsProviderName This property is required. String
Cloud service provider that applies to the provisioned the serverless instance.
providerSettingsRegionName This property is required. String
Human-readable label that identifies the physical location of your MongoDB serverless instance. The region you choose can affect network latency for clients accessing your databases.
stateName This property is required. String
Stage of deployment of this serverless instance when the resource made its request.
tags This property is required. List<Property Map>
Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See below.
terminationProtectionEnabled This property is required. Boolean
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
Href This property is required. string
Rel This property is required. string
Href This property is required. string
Rel This property is required. string
href This property is required. String
rel This property is required. String
href This property is required. string
rel This property is required. string
href This property is required. str
rel This property is required. str
href This property is required. String
rel This property is required. String

GetServerlessInstancesResultTag

Key This property is required. string
Constant that defines the set of the tag.
Value This property is required. string
Variable that belongs to the set of the tag.
Key This property is required. string
Constant that defines the set of the tag.
Value This property is required. string
Variable that belongs to the set of the tag.
key This property is required. String
Constant that defines the set of the tag.
value This property is required. String
Variable that belongs to the set of the tag.
key This property is required. string
Constant that defines the set of the tag.
value This property is required. string
Variable that belongs to the set of the tag.
key This property is required. str
Constant that defines the set of the tag.
value This property is required. str
Variable that belongs to the set of the tag.
key This property is required. String
Constant that defines the set of the tag.
value This property is required. String
Variable that belongs to the set of the tag.

Package Details

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