1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. SearchDeployment
MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi

mongodbatlas.SearchDeployment

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi

    # Resource: mongodbatlas.SearchDeployment

    mongodbatlas.SearchDeployment provides a Search Deployment resource. The resource lets you create, edit and delete dedicated search nodes in a cluster.

    NOTE: For details on supported cloud providers and existing limitations you can visit the Search Node Documentation.

    NOTE: Only a single search deployment resource can be defined for each cluster.

    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())));
        }
    }
    
    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}
    

    Create SearchDeployment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SearchDeployment(name: string, args: SearchDeploymentArgs, opts?: CustomResourceOptions);
    @overload
    def SearchDeployment(resource_name: str,
                         args: SearchDeploymentArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def SearchDeployment(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         cluster_name: Optional[str] = None,
                         project_id: Optional[str] = None,
                         specs: Optional[Sequence[SearchDeploymentSpecArgs]] = None,
                         timeouts: Optional[SearchDeploymentTimeoutsArgs] = None)
    func NewSearchDeployment(ctx *Context, name string, args SearchDeploymentArgs, opts ...ResourceOption) (*SearchDeployment, error)
    public SearchDeployment(string name, SearchDeploymentArgs args, CustomResourceOptions? opts = null)
    public SearchDeployment(String name, SearchDeploymentArgs args)
    public SearchDeployment(String name, SearchDeploymentArgs args, CustomResourceOptions options)
    
    type: mongodbatlas:SearchDeployment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SearchDeploymentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SearchDeploymentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SearchDeploymentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SearchDeploymentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SearchDeploymentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var searchDeploymentResource = new Mongodbatlas.SearchDeployment("searchDeploymentResource", new()
    {
        ClusterName = "string",
        ProjectId = "string",
        Specs = new[]
        {
            new Mongodbatlas.Inputs.SearchDeploymentSpecArgs
            {
                InstanceSize = "string",
                NodeCount = 0,
            },
        },
        Timeouts = new Mongodbatlas.Inputs.SearchDeploymentTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := mongodbatlas.NewSearchDeployment(ctx, "searchDeploymentResource", &mongodbatlas.SearchDeploymentArgs{
    	ClusterName: pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    	Specs: mongodbatlas.SearchDeploymentSpecArray{
    		&mongodbatlas.SearchDeploymentSpecArgs{
    			InstanceSize: pulumi.String("string"),
    			NodeCount:    pulumi.Int(0),
    		},
    	},
    	Timeouts: &mongodbatlas.SearchDeploymentTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var searchDeploymentResource = new SearchDeployment("searchDeploymentResource", SearchDeploymentArgs.builder()
        .clusterName("string")
        .projectId("string")
        .specs(SearchDeploymentSpecArgs.builder()
            .instanceSize("string")
            .nodeCount(0)
            .build())
        .timeouts(SearchDeploymentTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    search_deployment_resource = mongodbatlas.SearchDeployment("searchDeploymentResource",
        cluster_name="string",
        project_id="string",
        specs=[{
            "instance_size": "string",
            "node_count": 0,
        }],
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const searchDeploymentResource = new mongodbatlas.SearchDeployment("searchDeploymentResource", {
        clusterName: "string",
        projectId: "string",
        specs: [{
            instanceSize: "string",
            nodeCount: 0,
        }],
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: mongodbatlas:SearchDeployment
    properties:
        clusterName: string
        projectId: string
        specs:
            - instanceSize: string
              nodeCount: 0
        timeouts:
            create: string
            delete: string
            update: string
    

    SearchDeployment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SearchDeployment resource accepts the following input properties:

    ClusterName string
    Label that identifies the cluster to return the search nodes for.
    ProjectId string
    Unique 24-hexadecimal character string that identifies the project.
    Specs List<SearchDeploymentSpec>
    List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
    Timeouts SearchDeploymentTimeouts
    ClusterName string
    Label that identifies the cluster to return the search nodes for.
    ProjectId string
    Unique 24-hexadecimal character string that identifies the project.
    Specs []SearchDeploymentSpecArgs
    List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
    Timeouts SearchDeploymentTimeoutsArgs
    clusterName String
    Label that identifies the cluster to return the search nodes for.
    projectId String
    Unique 24-hexadecimal character string that identifies the project.
    specs List<SearchDeploymentSpec>
    List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
    timeouts SearchDeploymentTimeouts
    clusterName string
    Label that identifies the cluster to return the search nodes for.
    projectId string
    Unique 24-hexadecimal character string that identifies the project.
    specs SearchDeploymentSpec[]
    List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
    timeouts SearchDeploymentTimeouts
    cluster_name str
    Label that identifies the cluster to return the search nodes for.
    project_id str
    Unique 24-hexadecimal character string that identifies the project.
    specs Sequence[SearchDeploymentSpecArgs]
    List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
    timeouts SearchDeploymentTimeoutsArgs
    clusterName String
    Label that identifies the cluster to return the search nodes for.
    projectId String
    Unique 24-hexadecimal character string that identifies the 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.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SearchDeployment resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    StateName string
    Human-readable label that indicates the current operating condition of this search deployment.
    Id string
    The provider-assigned unique ID for this managed resource.
    StateName string
    Human-readable label that indicates the current operating condition of this search deployment.
    id String
    The provider-assigned unique ID for this managed resource.
    stateName String
    Human-readable label that indicates the current operating condition of this search deployment.
    id string
    The provider-assigned unique ID for this managed resource.
    stateName string
    Human-readable label that indicates the current operating condition of this search deployment.
    id str
    The provider-assigned unique ID for this managed resource.
    state_name str
    Human-readable label that indicates the current operating condition of this search deployment.
    id String
    The provider-assigned unique ID for this managed resource.
    stateName String
    Human-readable label that indicates the current operating condition of this search deployment.

    Look up Existing SearchDeployment Resource

    Get an existing SearchDeployment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SearchDeploymentState, opts?: CustomResourceOptions): SearchDeployment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_name: Optional[str] = None,
            project_id: Optional[str] = None,
            specs: Optional[Sequence[SearchDeploymentSpecArgs]] = None,
            state_name: Optional[str] = None,
            timeouts: Optional[SearchDeploymentTimeoutsArgs] = None) -> SearchDeployment
    func GetSearchDeployment(ctx *Context, name string, id IDInput, state *SearchDeploymentState, opts ...ResourceOption) (*SearchDeployment, error)
    public static SearchDeployment Get(string name, Input<string> id, SearchDeploymentState? state, CustomResourceOptions? opts = null)
    public static SearchDeployment get(String name, Output<String> id, SearchDeploymentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClusterName string
    Label that identifies the cluster to return the search nodes for.
    ProjectId string
    Unique 24-hexadecimal character string that identifies the project.
    Specs List<SearchDeploymentSpec>
    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.
    Timeouts SearchDeploymentTimeouts
    ClusterName string
    Label that identifies the cluster to return the search nodes for.
    ProjectId string
    Unique 24-hexadecimal character string that identifies the project.
    Specs []SearchDeploymentSpecArgs
    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.
    Timeouts SearchDeploymentTimeoutsArgs
    clusterName String
    Label that identifies the cluster to return the search nodes for.
    projectId String
    Unique 24-hexadecimal character string that identifies the project.
    specs List<SearchDeploymentSpec>
    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.
    timeouts SearchDeploymentTimeouts
    clusterName string
    Label that identifies the cluster to return the search nodes for.
    projectId string
    Unique 24-hexadecimal character string that identifies the project.
    specs SearchDeploymentSpec[]
    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.
    timeouts SearchDeploymentTimeouts
    cluster_name str
    Label that identifies the cluster to return the search nodes for.
    project_id str
    Unique 24-hexadecimal character string that identifies the project.
    specs Sequence[SearchDeploymentSpecArgs]
    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.
    timeouts SearchDeploymentTimeoutsArgs
    clusterName String
    Label that identifies the cluster to return the search nodes for.
    projectId String
    Unique 24-hexadecimal character string that identifies the 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.
    timeouts Property Map

    Supporting Types

    SearchDeploymentSpec, SearchDeploymentSpecArgs

    InstanceSize 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 int
    Number of search nodes in the cluster.
    InstanceSize 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 int
    Number of search nodes in the cluster.
    instanceSize 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 Integer
    Number of search nodes in the cluster.
    instanceSize 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 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.
    instanceSize 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 Number
    Number of search nodes in the cluster.

    SearchDeploymentTimeouts, SearchDeploymentTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi