---
subcategory: "Atlas Search"
---
# Resource: mongodbatlas_search_deployment
`mongodbatlas_search_deployment` 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](https://www.mongodb.com/docs/atlas/cluster-config/multi-cloud-distribution/#search-nodes-for-workload-isolation).
-> **NOTE:** Only a single search deployment resource can be defined for each cluster.
## Example Usages
```terraform
resource "mongodbatlas_project" "example" {
name = "project-name"
org_id = var.org_id
}
resource "mongodbatlas_advanced_cluster" "example" {
project_id = mongodbatlas_project.example.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"
}]
}]
}
resource "mongodbatlas_search_deployment" "example" {
project_id = mongodbatlas_project.example.id
cluster_name = mongodbatlas_advanced_cluster.example.name
specs = [
{
instance_size = "S20_HIGHCPU_NVME"
node_count = 2
}
]
}
data "mongodbatlas_search_deployment" "example" {
project_id = mongodbatlas_search_deployment.example.project_id
cluster_name = mongodbatlas_search_deployment.example.cluster_name
}
output "mongodbatlas_search_deployment_id" {
value = data.mongodbatlas_search_deployment.example.id
}
output "mongodbatlas_search_deployment_encryption_at_rest_provider" {
value = data.mongodbatlas_search_deployment.example.encryption_at_rest_provider
}
```
### Further Examples
- [Atlas Cluster with dedicated Search Nodes Deployment](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v2.21.0/examples/mongodbatlas_search_deployment)
## Schema
### Required
- `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, also known as `groupId` in the official documentation.
- `specs` (Attributes List) List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element. (see [below for nested schema](#nestedatt--specs))
### Optional
- `delete_on_create_timeout` (Boolean) Indicates whether to delete the resource being created if a timeout is reached when waiting for completion. When set to `true` and timeout occurs, it triggers the deletion and returns immediately without waiting for deletion to complete. When set to `false`, the timeout will not trigger resource deletion. If you suspect a transient error when the value is `true`, wait before retrying to allow resource deletion to finish. Default is `true`.
- `skip_wait_on_update` (Boolean) If true, the resource update is executed without waiting until the state is `IDLE`, making the operation faster. This might cause update errors to go unnoticed and lead to non-empty plans at the next terraform execution.
- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts))
### Read-Only
- `encryption_at_rest_provider` (String) 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.
- `state_name` (String) Human-readable label that indicates the current operating condition of this search deployment.
### Nested Schema for `specs`
Required:
- `instance_size` (String) Hardware specification for the search node instance sizes. The [MongoDB Atlas API](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Atlas-Search/operation/createAtlasSearchDeployment) describes the valid values. More details can also be found in the [Search Node Documentation](https://www.mongodb.com/docs/atlas/cluster-config/multi-cloud-distribution/#search-tier).
- `node_count` (Number) Number of search nodes in the cluster.
### Nested Schema for `timeouts`
Optional:
- `create` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), and "h" (hours). Default: `3h`.
- `delete` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), and "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. Default: `3h`.
- `update` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), and "h" (hours). Default: `3h`.
## Import
Search node resource can be imported using the project ID and cluster name, in the format `PROJECT_ID-CLUSTER_NAME`, e.g.
```
$ terraform import mongodbatlas_search_deployment.test 650972848269185c55f40ca1-Cluster0
```
After an import, a non-empty plan is expected if the configuration defines the `skip_wait_on_update` attribute. However, the update will not have any effect on the search deployment since `skip_wait_on_update` only relates to the update operations wait time.
For more information see: [MongoDB Atlas API - Search Node](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Atlas-Search/operation/createAtlasSearchDeployment) Documentation.