adb-infrastructure
AI-generated content
This document was generated by an AI assistant. Verify accuracy before relying on the details.
Role
Infrastructure-as-code repository for resources that are not in Kubernetes. It manages:
- MongoDB Atlas: migration / setup scripts, configurations via Atlas CLI and Realm CLI.
- AWS EventBridge: external event orchestration rules.
For Kubernetes deployment, see adb-charts. S3 buckets and SQS/SNS queues are currently managed across adb-charts/terraform/ and the AWS console (to clarify).
Stack
| Item | Tool |
|---|---|
| MongoDB Atlas | Atlas CLI + Realm CLI + JS scripts |
| AWS EventBridge | JSON configuration / scripts |
| (No root Terraform for now) | – |
Structure
adb-infrastructure/
├── aws/
│ └── event-bridge/ EventBridge rules
└── mongodb-atlas/
├── data-scripts/ ~37 migration / setup scripts
├── atlas-cli/ Atlas CLI configuration
└── realm-cli/ Realm CLI configuration
MongoDB Atlas
Data scripts
mongodb-atlas/data-scripts/ gathers about thirty JavaScript scripts (~37) used to:
- Create / drop collections.
- Index fields (full-text search, geospatial).
- Migrate document structures.
- Seed initial data (catalogues, translations).
- Clean up test collections.
Run manually via mongosh or integrated into data pipelines.
Atlas CLI
The atlas-cli/ subfolder contains configuration files for the Atlas CLI (Atlas command-line tool). It can be used to script:
- Cluster creation / deletion per environment.
- Database user management.
- Snapshots and restores.
- Network access configuration (IP allowlist).
Realm CLI
realm-cli/ configures Atlas Functions (formerly Realm) — serverless functions running close to the database. Used in particular for the MongoDB triggers documented in technical-epics/messaging/i-have-mongodb-trigger.md.
AWS EventBridge
aws/event-bridge/ contains the EventBridge orchestration rules:
- Event patterns (filtering by source, type).
- Targets (Lambda, SNS, SQS, other rules).
- Schedule expressions for time-based triggers.
EventBridge acts here as a router between external events (for instance webhooks from banking partners, electronic-signature notifications) and the internal services through SQS queues.
flowchart LR
External[External sources<br/>SaaS, webhooks]
EB[AWS EventBridge<br/>rules + targets]
SQS[Internal SQS queues]
Services[adb-* services]
External --> EB
EB --> SQS
SQS --> Services
Databases per environment
MongoDB Atlas hosts several clusters / databases:
adb-developmentadb-integrationadb-stagingadb-production
Naming pattern: mongodb+srv://adb-app:<secret>@adb-<env>.<id>.mongodb.net/.
AWS account: 182790345476 (region eu-west-1).
Notes
- No root Terraform detected. AWS resources outside Kubernetes are managed either via the console, dedicated CLIs, or in
adb-charts/terraform/(Neo4j). - Eventually, consolidating into root-level Terraform in the monorepo would be desirable for traceability.
Links
- Code:
adb-infrastructure/ - MongoDB triggers doc:
technical-epics/messaging/i-have-mongodb-trigger.md