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

mongodbatlas.getSearchDeployment

Explore with Pulumi AI

# Data Source: mongodbatlas.SearchDeployment

mongodbatlas.SearchDeployment describes a search node deployment.

Example Usage

S

Coming soon!
Coming soon!
Coming soon!
Coming soon!
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()
                .instance_size("S20_HIGHCPU_NVME")
                .node_count(2)
                .build())
            .build());

        final var example = MongodbatlasFunctions.getSearchDeployment(GetSearchDeploymentArgs.builder()
            .projectId(exampleSearchDeployment.projectId())
            .clusterName(exampleSearchDeployment.clusterName())
            .build());

        ctx.export("mongodbatlasSearchDeploymentId", example.applyValue(getSearchDeploymentResult -> getSearchDeploymentResult).applyValue(example -> example.applyValue(getSearchDeploymentResult -> getSearchDeploymentResult.id())));
    }
}
Copy
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:
        - instance_size: S20_HIGHCPU_NVME
          node_count: 2
variables:
  example:
    fn::invoke:
      function: mongodbatlas:getSearchDeployment
      arguments:
        projectId: ${exampleSearchDeployment.projectId}
        clusterName: ${exampleSearchDeployment.clusterName}
outputs:
  mongodbatlasSearchDeploymentId: ${example.id}
Copy

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>
Copy
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]
Copy
func LookupSearchDeployment(ctx *Context, args *LookupSearchDeploymentArgs, opts ...InvokeOption) (*LookupSearchDeploymentResult, error)
func LookupSearchDeploymentOutput(ctx *Context, args *LookupSearchDeploymentOutputArgs, opts ...InvokeOption) LookupSearchDeploymentResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetSearchDeploymentResult> getSearchDeployment(GetSearchDeploymentArgs args, InvokeOptions options)
public static Output<GetSearchDeploymentResult> getSearchDeployment(GetSearchDeploymentArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: mongodbatlas:index/getSearchDeployment:getSearchDeployment
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterName This property is required. string
Label that identifies the cluster to return the search nodes for.
ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project.
ClusterName This property is required. string
Label that identifies the cluster to return the search nodes for.
ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project.
clusterName This property is required. String
Label that identifies the cluster to return the search nodes for.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies your project.
clusterName This property is required. string
Label that identifies the cluster to return the search nodes for.
projectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project.
cluster_name This property is required. str
Label that identifies the cluster to return the search nodes for.
project_id This property is required. str
Unique 24-hexadecimal digit string that identifies your project.
clusterName This property is required. String
Label that identifies the cluster to return the search nodes for.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies your project.

getSearchDeployment Result

The following output properties are available:

ClusterName string
Label that identifies the cluster to return the search nodes for.
Id string
Unique 24-hexadecimal digit string that identifies the search deployment.
ProjectId string
Unique 24-hexadecimal digit string that identifies your project.
Specs List<GetSearchDeploymentSpec>
List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
StateName string
Human-readable label that indicates the current operating condition of this search deployment.
ClusterName string
Label that identifies the cluster to return the search nodes for.
Id string
Unique 24-hexadecimal digit string that identifies the search deployment.
ProjectId string
Unique 24-hexadecimal digit string that identifies your project.
Specs []GetSearchDeploymentSpec
List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
StateName string
Human-readable label that indicates the current operating condition of this search deployment.
clusterName String
Label that identifies the cluster to return the search nodes for.
id String
Unique 24-hexadecimal digit string that identifies the search deployment.
projectId String
Unique 24-hexadecimal digit string that identifies your project.
specs List<GetSearchDeploymentSpec>
List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
stateName String
Human-readable label that indicates the current operating condition of this search deployment.
clusterName string
Label that identifies the cluster to return the search nodes for.
id string
Unique 24-hexadecimal digit string that identifies the search deployment.
projectId string
Unique 24-hexadecimal digit string that identifies your project.
specs GetSearchDeploymentSpec[]
List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
stateName 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.
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[GetSearchDeploymentSpec]
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.
clusterName String
Label that identifies the cluster to return the search nodes for.
id String
Unique 24-hexadecimal digit string that identifies the search deployment.
projectId 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.
stateName String
Human-readable label that indicates the current operating condition of this search deployment.

Supporting Types

GetSearchDeploymentSpec

InstanceSize This property is required. 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.
NodeCount This property is required. int
Number of search nodes in the cluster.
InstanceSize This property is required. 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.
NodeCount This property is required. int
Number of search nodes in the cluster.
instanceSize This property is required. 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.
nodeCount This property is required. Integer
Number of search nodes in the cluster.
instanceSize This property is required. 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.
nodeCount This property is required. number
Number of search nodes in the cluster.
instance_size This property is required. 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 This property is required. int
Number of search nodes in the cluster.
instanceSize This property is required. 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.
nodeCount This property is required. 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 mongodbatlas Terraform Provider.