MongoDB Atlas v4.0.0 published on Tuesday, Dec 30, 2025 by Pulumi
MongoDB Atlas v4.0.0 published on Tuesday, Dec 30, 2025 by Pulumi
mongodbatlas.SearchDeployment describes a search node deployment.
Example Usage
S
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const exampleProject = new mongodbatlas.Project("example", {
name: "project-name",
orgId: orgId,
});
const exampleAdvancedCluster = new mongodbatlas.AdvancedCluster("example", {
projectId: exampleProject.id,
name: "ClusterExample",
clusterType: "REPLICASET",
replicationSpecs: [{
regionConfigs: [{
electableSpecs: {
instanceSize: "M10",
nodeCount: 3,
},
providerName: "AWS",
priority: 7,
regionName: "US_EAST_1",
}],
}],
});
const exampleSearchDeployment = new mongodbatlas.SearchDeployment("example", {
projectId: exampleProject.id,
clusterName: exampleAdvancedCluster.name,
specs: [{
instanceSize: "S20_HIGHCPU_NVME",
nodeCount: 2,
}],
});
const example = mongodbatlas.getSearchDeploymentOutput({
projectId: exampleSearchDeployment.projectId,
clusterName: exampleSearchDeployment.clusterName,
});
export const mongodbatlasSearchDeploymentId = example.apply(example => example.id);
export const mongodbatlasSearchDeploymentEncryptionAtRestProvider = example.apply(example => example.encryptionAtRestProvider);
import pulumi
import pulumi_mongodbatlas as mongodbatlas
example_project = mongodbatlas.Project("example",
name="project-name",
org_id=org_id)
example_advanced_cluster = mongodbatlas.AdvancedCluster("example",
project_id=example_project.id,
name="ClusterExample",
cluster_type="REPLICASET",
replication_specs=[{
"region_configs": [{
"electable_specs": {
"instance_size": "M10",
"node_count": 3,
},
"provider_name": "AWS",
"priority": 7,
"region_name": "US_EAST_1",
}],
}])
example_search_deployment = mongodbatlas.SearchDeployment("example",
project_id=example_project.id,
cluster_name=example_advanced_cluster.name,
specs=[{
"instance_size": "S20_HIGHCPU_NVME",
"node_count": 2,
}])
example = mongodbatlas.get_search_deployment_output(project_id=example_search_deployment.project_id,
cluster_name=example_search_deployment.cluster_name)
pulumi.export("mongodbatlasSearchDeploymentId", example.id)
pulumi.export("mongodbatlasSearchDeploymentEncryptionAtRestProvider", example.encryption_at_rest_provider)
package main
import (
"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleProject, err := mongodbatlas.NewProject(ctx, "example", &mongodbatlas.ProjectArgs{
Name: pulumi.String("project-name"),
OrgId: pulumi.Any(orgId),
})
if err != nil {
return err
}
exampleAdvancedCluster, err := mongodbatlas.NewAdvancedCluster(ctx, "example", &mongodbatlas.AdvancedClusterArgs{
ProjectId: exampleProject.ID(),
Name: pulumi.String("ClusterExample"),
ClusterType: pulumi.String("REPLICASET"),
ReplicationSpecs: mongodbatlas.AdvancedClusterReplicationSpecArray{
&mongodbatlas.AdvancedClusterReplicationSpecArgs{
RegionConfigs: mongodbatlas.AdvancedClusterReplicationSpecRegionConfigArray{
&mongodbatlas.AdvancedClusterReplicationSpecRegionConfigArgs{
ElectableSpecs: &mongodbatlas.AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs{
InstanceSize: pulumi.String("M10"),
NodeCount: pulumi.Int(3),
},
ProviderName: pulumi.String("AWS"),
Priority: pulumi.Int(7),
RegionName: pulumi.String("US_EAST_1"),
},
},
},
},
})
if err != nil {
return err
}
exampleSearchDeployment, err := mongodbatlas.NewSearchDeployment(ctx, "example", &mongodbatlas.SearchDeploymentArgs{
ProjectId: exampleProject.ID(),
ClusterName: exampleAdvancedCluster.Name,
Specs: mongodbatlas.SearchDeploymentSpecArray{
&mongodbatlas.SearchDeploymentSpecArgs{
InstanceSize: pulumi.String("S20_HIGHCPU_NVME"),
NodeCount: pulumi.Int(2),
},
},
})
if err != nil {
return err
}
example := mongodbatlas.LookupSearchDeploymentOutput(ctx, mongodbatlas.GetSearchDeploymentOutputArgs{
ProjectId: exampleSearchDeployment.ProjectId,
ClusterName: exampleSearchDeployment.ClusterName,
}, nil)
ctx.Export("mongodbatlasSearchDeploymentId", example.ApplyT(func(example mongodbatlas.GetSearchDeploymentResult) (*string, error) {
return &example.Id, nil
}).(pulumi.StringPtrOutput))
ctx.Export("mongodbatlasSearchDeploymentEncryptionAtRestProvider", example.ApplyT(func(example mongodbatlas.GetSearchDeploymentResult) (*string, error) {
return &example.EncryptionAtRestProvider, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var exampleProject = new Mongodbatlas.Project("example", new()
{
Name = "project-name",
OrgId = orgId,
});
var exampleAdvancedCluster = new Mongodbatlas.AdvancedCluster("example", new()
{
ProjectId = exampleProject.Id,
Name = "ClusterExample",
ClusterType = "REPLICASET",
ReplicationSpecs = new[]
{
new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecArgs
{
RegionConfigs = new[]
{
new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecRegionConfigArgs
{
ElectableSpecs = new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs
{
InstanceSize = "M10",
NodeCount = 3,
},
ProviderName = "AWS",
Priority = 7,
RegionName = "US_EAST_1",
},
},
},
},
});
var exampleSearchDeployment = new Mongodbatlas.SearchDeployment("example", new()
{
ProjectId = exampleProject.Id,
ClusterName = exampleAdvancedCluster.Name,
Specs = new[]
{
new Mongodbatlas.Inputs.SearchDeploymentSpecArgs
{
InstanceSize = "S20_HIGHCPU_NVME",
NodeCount = 2,
},
},
});
var example = Mongodbatlas.GetSearchDeployment.Invoke(new()
{
ProjectId = exampleSearchDeployment.ProjectId,
ClusterName = exampleSearchDeployment.ClusterName,
});
return new Dictionary<string, object?>
{
["mongodbatlasSearchDeploymentId"] = example.Apply(getSearchDeploymentResult => getSearchDeploymentResult.Id),
["mongodbatlasSearchDeploymentEncryptionAtRestProvider"] = example.Apply(getSearchDeploymentResult => getSearchDeploymentResult.EncryptionAtRestProvider),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.Project;
import com.pulumi.mongodbatlas.ProjectArgs;
import com.pulumi.mongodbatlas.AdvancedCluster;
import com.pulumi.mongodbatlas.AdvancedClusterArgs;
import com.pulumi.mongodbatlas.inputs.AdvancedClusterReplicationSpecArgs;
import com.pulumi.mongodbatlas.SearchDeployment;
import com.pulumi.mongodbatlas.SearchDeploymentArgs;
import com.pulumi.mongodbatlas.inputs.SearchDeploymentSpecArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetSearchDeploymentArgs;
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) {
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.name("project-name")
.orgId(orgId)
.build());
var exampleAdvancedCluster = new AdvancedCluster("exampleAdvancedCluster", AdvancedClusterArgs.builder()
.projectId(exampleProject.id())
.name("ClusterExample")
.clusterType("REPLICASET")
.replicationSpecs(AdvancedClusterReplicationSpecArgs.builder()
.regionConfigs(AdvancedClusterReplicationSpecRegionConfigArgs.builder()
.electableSpecs(AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs.builder()
.instanceSize("M10")
.nodeCount(3)
.build())
.providerName("AWS")
.priority(7)
.regionName("US_EAST_1")
.build())
.build())
.build());
var exampleSearchDeployment = new SearchDeployment("exampleSearchDeployment", SearchDeploymentArgs.builder()
.projectId(exampleProject.id())
.clusterName(exampleAdvancedCluster.name())
.specs(SearchDeploymentSpecArgs.builder()
.instanceSize("S20_HIGHCPU_NVME")
.nodeCount(2)
.build())
.build());
final var example = MongodbatlasFunctions.getSearchDeployment(GetSearchDeploymentArgs.builder()
.projectId(exampleSearchDeployment.projectId())
.clusterName(exampleSearchDeployment.clusterName())
.build());
ctx.export("mongodbatlasSearchDeploymentId", example.applyValue(_example -> _example.id()));
ctx.export("mongodbatlasSearchDeploymentEncryptionAtRestProvider", example.applyValue(_example -> _example.encryptionAtRestProvider()));
}
}
resources:
exampleProject:
type: mongodbatlas:Project
name: example
properties:
name: project-name
orgId: ${orgId}
exampleAdvancedCluster:
type: mongodbatlas:AdvancedCluster
name: example
properties:
projectId: ${exampleProject.id}
name: ClusterExample
clusterType: REPLICASET
replicationSpecs:
- regionConfigs:
- electableSpecs:
instanceSize: M10
nodeCount: 3
providerName: AWS
priority: 7
regionName: US_EAST_1
exampleSearchDeployment:
type: mongodbatlas:SearchDeployment
name: example
properties:
projectId: ${exampleProject.id}
clusterName: ${exampleAdvancedCluster.name}
specs:
- instanceSize: S20_HIGHCPU_NVME
nodeCount: 2
variables:
example:
fn::invoke:
function: mongodbatlas:getSearchDeployment
arguments:
projectId: ${exampleSearchDeployment.projectId}
clusterName: ${exampleSearchDeployment.clusterName}
outputs:
mongodbatlasSearchDeploymentId: ${example.id}
mongodbatlasSearchDeploymentEncryptionAtRestProvider: ${example.encryptionAtRestProvider}
Using getSearchDeployment
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 getSearchDeployment(args: GetSearchDeploymentArgs, opts?: InvokeOptions): Promise<GetSearchDeploymentResult>
function getSearchDeploymentOutput(args: GetSearchDeploymentOutputArgs, opts?: InvokeOptions): Output<GetSearchDeploymentResult>def get_search_deployment(cluster_name: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSearchDeploymentResult
def get_search_deployment_output(cluster_name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSearchDeploymentResult]func LookupSearchDeployment(ctx *Context, args *LookupSearchDeploymentArgs, opts ...InvokeOption) (*LookupSearchDeploymentResult, error)
func LookupSearchDeploymentOutput(ctx *Context, args *LookupSearchDeploymentOutputArgs, opts ...InvokeOption) LookupSearchDeploymentResultOutput> Note: This function is named LookupSearchDeployment in the Go SDK.
public static class GetSearchDeployment
{
public static Task<GetSearchDeploymentResult> InvokeAsync(GetSearchDeploymentArgs args, InvokeOptions? opts = null)
public static Output<GetSearchDeploymentResult> Invoke(GetSearchDeploymentInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSearchDeploymentResult> getSearchDeployment(GetSearchDeploymentArgs args, InvokeOptions options)
public static Output<GetSearchDeploymentResult> getSearchDeployment(GetSearchDeploymentArgs args, InvokeOptions options)
fn::invoke:
function: mongodbatlas:index/getSearchDeployment:getSearchDeployment
arguments:
# arguments dictionaryThe following arguments are supported:
- Cluster
Name string - Label that identifies the cluster to return the search nodes for.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- Cluster
Name string - Label that identifies the cluster to return the search nodes for.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- cluster
Name String - Label that identifies the cluster to return the search nodes for.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project.
- cluster
Name string - Label that identifies the cluster to return the search nodes for.
- project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- cluster_
name str - Label that identifies the cluster to return the search nodes for.
- project_
id str - Unique 24-hexadecimal digit string that identifies your project.
- cluster
Name String - Label that identifies the cluster to return the search nodes for.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project.
getSearchDeployment Result
The following output properties are available:
- Cluster
Name string - Label that identifies the cluster to return the search nodes for.
- Encryption
At stringRest Provider - Cloud service provider that manages your customer keys to provide an additional layer of Encryption At Rest for the cluster.
- Id string
- Unique 24-hexadecimal digit string that identifies the search deployment.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- Specs
List<Get
Search Deployment Spec> - List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
- State
Name string - Human-readable label that indicates the current operating condition of this search deployment.
- Cluster
Name string - Label that identifies the cluster to return the search nodes for.
- Encryption
At stringRest Provider - Cloud service provider that manages your customer keys to provide an additional layer of Encryption At Rest for the cluster.
- Id string
- Unique 24-hexadecimal digit string that identifies the search deployment.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- Specs
[]Get
Search Deployment Spec - List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
- State
Name string - Human-readable label that indicates the current operating condition of this search deployment.
- cluster
Name String - Label that identifies the cluster to return the search nodes for.
- encryption
At StringRest Provider - Cloud service provider that manages your customer keys to provide an additional layer of Encryption At Rest for the cluster.
- id String
- Unique 24-hexadecimal digit string that identifies the search deployment.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project.
- specs
List<Get
Search Deployment Spec> - List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
- state
Name String - Human-readable label that indicates the current operating condition of this search deployment.
- cluster
Name string - Label that identifies the cluster to return the search nodes for.
- encryption
At stringRest Provider - Cloud service provider that manages your customer keys to provide an additional layer of Encryption At Rest for the cluster.
- id string
- Unique 24-hexadecimal digit string that identifies the search deployment.
- project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- specs
Get
Search Deployment Spec[] - List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
- state
Name string - Human-readable label that indicates the current operating condition of this search deployment.
- cluster_
name str - Label that identifies the cluster to return the search nodes for.
- encryption_
at_ strrest_ provider - Cloud service provider that manages your customer keys to provide an additional layer of Encryption At Rest for the cluster.
- id str
- Unique 24-hexadecimal digit string that identifies the search deployment.
- project_
id str - Unique 24-hexadecimal digit string that identifies your project.
- specs
Sequence[Get
Search Deployment Spec] - List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
- state_
name str - Human-readable label that indicates the current operating condition of this search deployment.
- cluster
Name String - Label that identifies the cluster to return the search nodes for.
- encryption
At StringRest Provider - Cloud service provider that manages your customer keys to provide an additional layer of Encryption At Rest for the cluster.
- id String
- Unique 24-hexadecimal digit string that identifies the search deployment.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project.
- specs List<Property Map>
- List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
- state
Name String - Human-readable label that indicates the current operating condition of this search deployment.
Supporting Types
GetSearchDeploymentSpec
- Instance
Size string - Hardware specification for the search node instance sizes. The MongoDB Atlas API describes the valid values. More details can also be found in the Search Node Documentation.
- Node
Count int - Number of search nodes in the cluster.
- Instance
Size string - Hardware specification for the search node instance sizes. The MongoDB Atlas API describes the valid values. More details can also be found in the Search Node Documentation.
- Node
Count int - Number of search nodes in the cluster.
- instance
Size String - Hardware specification for the search node instance sizes. The MongoDB Atlas API describes the valid values. More details can also be found in the Search Node Documentation.
- node
Count Integer - Number of search nodes in the cluster.
- instance
Size string - Hardware specification for the search node instance sizes. The MongoDB Atlas API describes the valid values. More details can also be found in the Search Node Documentation.
- node
Count number - Number of search nodes in the cluster.
- instance_
size str - Hardware specification for the search node instance sizes. The MongoDB Atlas API describes the valid values. More details can also be found in the Search Node Documentation.
- node_
count int - Number of search nodes in the cluster.
- instance
Size String - Hardware specification for the search node instance sizes. The MongoDB Atlas API describes the valid values. More details can also be found in the Search Node Documentation.
- node
Count Number - Number of search nodes in the cluster.
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlasTerraform Provider.
MongoDB Atlas v4.0.0 published on Tuesday, Dec 30, 2025 by Pulumi
