-
Notifications
You must be signed in to change notification settings - Fork 0
Elasticsearch
udx-github edited this page Aug 14, 2026
·
1 revision
Provisions a managed Elasticsearch cluster and declares its schema - indices, aliases, index templates - plus least-privilege API keys for each consumer, all from one service entry.
Use this module when a tenant needs search as platform infrastructure instead of a hand-created cluster: the cluster, its indices, and the credentials its apps consume are all reviewed config diffs.
- Elastic Cloud provisioning (
provider: elasticcloud) with version, region, size, HA zone count, autoscaling ceiling, and optional Kibana. - AWS OpenSearch provisioning (
provider: aws-opensearch) with fine-grained access control, a generated master password vaulted to Secret Manager, encryption at rest and in transit, a business-levelsizethat maps to instance classes (vendor.aws.instance_typeoverrides), and an optional source-IP allowlist (vendor.aws.allowed_cidrs). - Vendor-neutral schema layer: index templates, indices, aliases, and mappings (written as YAML, applied to whatever endpoint the cluster layer produced).
- On elasticcloud, per-consumer security roles and scoped API keys; the
elasticsuperuser is vaulted for break-glass only. On aws-opensearch,accessis rejected at plan time (OpenSearch has no API-key API); consumers use the vaulted master credential or IAM/SigV4. - Consumer credentials written to the tenant GCP project under stable names (
<PREFIX>_ENDPOINT,<PREFIX>_CLOUD_ID,<PREFIX>_<CONSUMER>_API_KEY,<PREFIX>_SUPERUSER_PASSWORD) so ak8s-configmapentry survives a vendor switch unchanged. - Index deletion protection on by default: plans that would destroy an index fail unless
deletion_protection: falseis set explicitly.
- An Elastic Cloud API key stored in Secret Manager (
ELASTIC_CLOUD_API_KEYin the central Rabbit project by default; overridable withapi_key_project/api_key_secret). - Standard R2A tenant grants on
client_project_id.
---
name: 'UDX dev search'
id: 'elasticsearch-udx-dev-staging'
module: 'elasticsearch'
configurations:
provider: 'elasticcloud'
cluster_name: 'udx-dev-search-staging'
version: '9.1.0'
region: 'gcp-us-east1'
size: '4g'
zone_count: 1
client_project_id: 'udx-dev-project'
indices:
leads-v1:
aliases: ['leads.read', 'leads.write']
projects-v1:
aliases: ['projects.read']
access:
explorer:
read: ['leads.read', 'projects.read']
write: ['leads.write']Produces ES_UDX_DEV_SEARCH_STAGING_ENDPOINT, ES_UDX_DEV_SEARCH_STAGING_CLOUD_ID, and ES_UDX_DEV_SEARCH_STAGING_EXPLORER_API_KEY in udx-dev-project.
- Keep cluster entries on long-lived lifecycles (
staging/production). R2A destroys branch-scoped infrastructure when a branch is deleted; an Elasticsearch cluster with data should never be branch-scoped. - Mappings are YAML maps; the module jsonencodes them. Elasticsearch rejects breaking mapping changes on existing fields, so evolving a schema means adding a new index version and moving its aliases in the same diff.
- Changing creation-only index settings (for example
number_of_shards) forces index replacement; the default deletion protection turns that into a failed plan, which is the intended guard rail. - On the very first apply, schema-layer resources plan as
(known after apply)because the cluster endpoint does not exist yet; subsequent runs produce complete plans. -
k8s-eckis reserved in the schema but not yet implemented;providerrejects it at plan time with a clear message.
- AWS ACM Certificate
- AWS CloudFormation Stack
- AWS CloudFront Distribution
- AWS CloudFront Response Headers Policy
- AWS Route53 DNS
- AWS WAF
- Elasticsearch
- GCP Cloud Run
- GCP Cloud Scheduler
- GCP Firebase Realtime Database (
gcp-firebase-rtdb) - GCP Firestore Database (
gcp-firestore) - GCP GKE Cluster
- GCP GKE Node Pool
- GCP IAM
- GCP Monitoring
- GCP Networking
- GCP PostgreSQL Instance
- GCP Pub/Sub
- GCP Secret Manager
- GCP Service Account
- GCP SQL Instance
- GCP Static IP
- GCP Storage
- Ghost Inspector Sync
- K8s Access
- K8s ARC Controller
- K8s ARC Runner
- K8s ConfigMap
- K8s Deployment
- K8s HPA
- K8s HTTP Gateway Route
- K8s HTTP Health Check Policy
- K8s Memcached
- K8s Namespace
- K8s PDB
- K8s Secret
- K8s Service
- K8s Shared HTTP Gateway
- NewRelic APM Browser
- NewRelic Synthetic Monitors