Search

OpenSearch with a password for full-text search and analytics.

Overview

A search service is OpenSearch with a password: it finds words across lots of text quickly and sums up large amounts of data.

When to use it

  • A search box over products or articles.
  • Looking through logs or events.
  • Counts over time.

How it works

OpenSearch 2.19 or 3.3
One single-node container per service, pinned by digest.
Security plugin
On, with an admin password from a managed secret; the REST API uses basic authentication inside the network.
Memory
Half of the memory you give it goes to the engine’s heap.

Each search service runs as one node with its data on a volume and needs no change to the host’s kernel settings. Apps reach it by its private name with the managed password.

Architecture

Search architectureApps index and query OpenSearch by name with the managed password.REST, basic authYour appOpenSearchsingle nodeIndex data
Apps index and query OpenSearch by name with the managed password.
  • Your app to OpenSearch: REST, basic auth
  • OpenSearch to Index data

Flows

Search as you type

  1. The app indexes each product when it changes.
  2. The search box sends the query to OpenSearch.
  3. The best matches come back ranked.

Set it up

In the console

  1. Open Search and choose New search service.
  2. Name it, choose the version and memory.
  3. Choose Create; its page shows the address and the password’s secret.

With the CLI

enclave search create catalog --wait

With OpenTofu

OpenTofu configuration
resource "enclave_search" "catalog" {
  name    = "catalog"
  version = "3"
}

Settings reference

Every setting and output of the OpenTofu resource; the console and the CLI use the same names in their own words. Generated from platform 4d30582.

enclave_search
NameTypeUseWhat it does
nametextrequiredName of the search service: 3–40 lowercase letters, digits or hyphens, starting with a letter. Changing it replaces the search service.
machinetextoptionalThe machine to run on (default: EnclaveStack chooses, and this reads back its choice). Changing it moves the resource, with its data, in place; apply waits for the move.
machine_labelsmap of textoptionalLabels the machine must have, when machine isn't set (key=value, all must match).
memory_mibnumberoptionalMemory in MiB, 1024–16384 in steps of 256 (default 2048); half is the heap.
networktextoptionalNetwork to place it in (default: the default network). Changes in place.
projecttextoptionalThe project to create it in. Defaults to the provider's project (ENCLAVE_PROJECT, else default). Changing it replaces the resource.
subnettextoptionalSubnet of the network (default: its first).
versiontextoptionalOpenSearch major version, 3 (default) or 2. Changing it replaces the service.
idtextoutputResource ID.
internal_urltextoutputREST API inside its network.
password_secrettextoutputName of the managed secret holding the admin password.
private_dnstextoutputName it answers to inside its network: <name>.search.internal.
urltextoutputREST API on this machine (none in a network without internet).
usernametextoutputThe admin user.

Limits and security

Good to know

  • Its version can’t change later.
  • It keeps the memory you give it whether busy or idle.

Security

  • Never exposed through a domain or CDN; reachable inside its network with the password.