mongodbatlas.SearchDeployment
Explore with Pulumi AI
# 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:
- Cluster
Name string - Label that identifies the cluster to return the search nodes for.
- Project
Id string - Unique 24-hexadecimal character string that identifies the project.
- Specs
List<Search
Deployment Spec> - List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
- Timeouts
Search
Deployment Timeouts
- Cluster
Name string - Label that identifies the cluster to return the search nodes for.
- Project
Id string - Unique 24-hexadecimal character string that identifies the project.
- Specs
[]Search
Deployment Spec Args - List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
- Timeouts
Search
Deployment Timeouts Args
- cluster
Name String - Label that identifies the cluster to return the search nodes for.
- project
Id String - Unique 24-hexadecimal character string that identifies the project.
- specs
List<Search
Deployment Spec> - List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
- timeouts
Search
Deployment Timeouts
- cluster
Name string - Label that identifies the cluster to return the search nodes for.
- project
Id string - Unique 24-hexadecimal character string that identifies the project.
- specs
Search
Deployment Spec[] - List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
- timeouts
Search
Deployment Timeouts
- 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[Search
Deployment Spec Args] - List of settings that configure the search nodes for your cluster. This list is currently limited to defining a single element.
- timeouts
Search
Deployment Timeouts Args
- cluster
Name String - Label that identifies the cluster to return the search nodes for.
- project
Id 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 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.
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.
- Cluster
Name string - Label that identifies the cluster to return the search nodes for.
- Project
Id string - Unique 24-hexadecimal character string that identifies the project.
- Specs
List<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.
- Timeouts
Search
Deployment Timeouts
- Cluster
Name string - Label that identifies the cluster to return the search nodes for.
- Project
Id string - Unique 24-hexadecimal character string that identifies the project.
- Specs
[]Search
Deployment Spec Args - 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.
- Timeouts
Search
Deployment Timeouts Args
- cluster
Name String - Label that identifies the cluster to return the search nodes for.
- project
Id String - Unique 24-hexadecimal character string that identifies the project.
- specs
List<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.
- timeouts
Search
Deployment Timeouts
- cluster
Name string - Label that identifies the cluster to return the search nodes for.
- project
Id string - Unique 24-hexadecimal character string that identifies the project.
- specs
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.
- timeouts
Search
Deployment Timeouts
- 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[Search
Deployment Spec Args] - 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
Search
Deployment Timeouts Args
- cluster
Name String - Label that identifies the cluster to return the search nodes for.
- project
Id 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.
- state
Name String - Human-readable label that indicates the current operating condition of this search deployment.
- timeouts Property Map
Supporting Types
SearchDeploymentSpec, SearchDeploymentSpecArgs
- 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.
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.