Alethia Labs

Domain Model & Terminology

The domain model, entity relationships, and lifecycle states.

Domain Model & Terminology

The platform uses a clear, consistent domain model. Each term maps to a distinct architectural concept.

Domain Model

Glossary

TermMeaning
ConsoleWeb platform (control plane)
alethiaCLI tool
ZoneWorkspace / project grouping
SpecA single infrastructure configuration
RunnerExecution agent (worker)
ApplyDeployment action (alethia apply)
DesignCreate a new Spec configuration

Entity Relationships

User
 └── Zones (1:N)
      └── Specs (1:N)
           ├── Cloud Identity (N:1) ─── links to AWS/GCP/Azure account
           ├── spec_network (1:1) ─── VPC / VNet / VPC Network
           ├── spec_cluster (1:1) ─── EKS / GKE / AKS
           ├── spec_dns (1:1) ─── Route53 / Cloud DNS / Azure DNS
           ├── spec_repositories (1:1) ─── Git repo references
           ├── spec_databases (1:N) ─── Aurora / Cloud SQL / Azure DB
           ├── spec_caches (1:N) ─── ElastiCache / Memorystore / Azure Cache
           ├── spec_queues (1:N) ─── SQS / Pub/Sub / Service Bus
           ├── spec_topics (1:N) ─── SNS / Pub/Sub / Service Bus Topics
           ├── spec_nosql_tables (1:N) ─── DynamoDB / Firestore / Cosmos DB
           ├── spec_container_registries (1:N) ─── ECR / Artifact Registry / ACR
           ├── spec_secrets (1:N) ─── Secrets Manager / Secret Manager / Key Vault
           └── provision_jobs (1:N) ─── PLAN, DEPLOY, DESTROY, etc.
                └── provision_job_logs (1:N)

A Zone contains one or more Specs, and a Spec is provisioned by a Runner.

Singleton components (1:1 per Spec): network, cluster, DNS, repositories. Every Spec has exactly one of each (or none if that section is disabled).

Multi-instance components (1:N per Spec): databases, caches, queues, topics, NoSQL tables, container registries, secrets. A Spec can have zero or many of each.

Spec Lifecycle

A Spec progresses through these states:

DRAFT ──► QUEUED ──► PROVISIONING ──► ACTIVE


                                    DESTROYING ──► DESTROYED


                                      FAILED
StatusMeaning
DRAFTConfiguration created but not yet submitted for provisioning
QUEUEDA provisioning job has been created and is waiting for a Runner
PROVISIONINGA Runner is actively running Terraform
ACTIVEInfrastructure is provisioned and running
DESTROYINGA destroy job is in progress
DESTROYEDInfrastructure has been torn down
FAILEDProvisioning or destruction failed (can be retried)

Component Status

Each Spec component (network, cluster, database, etc.) has its own status independent of the parent Spec:

StatusMeaning
PENDINGAwaiting first provisioning
CREATINGCurrently being created by Terraform
ACTIVESuccessfully provisioned
UPDATINGConfiguration change being applied
FAILEDCreation or update failed
DESTROYINGBeing torn down
DESTROYEDSuccessfully removed

Job Lifecycle

Jobs represent units of work executed by Runners:

QUEUED ──► CLAIMED ──► PROCESSING ──► SUCCESS

                          ├──► FAILED

                          └──► CANCELLED
StatusMeaning
QUEUEDWaiting in the queue for a Runner to claim
CLAIMEDA Runner has atomically claimed this job
PROCESSINGRunner is actively executing (Terraform running)
SUCCESSJob completed successfully
FAILEDJob failed (error message attached)
CANCELLEDUser cancelled the job before completion

Job Types

TypePurpose
CONNECTION_TESTVerify cloud credentials work, cache discovered resources
FETCH_RESOURCESDiscover existing cloud resources (VPCs, subnets, hosted zones)
BOOTSTRAPInitialize infrastructure workspace
PLANRun terraform plan + optional Infracost analysis
DEPLOYRun terraform apply + install ArgoCD
DESTROYRun terraform destroy with graceful cleanup
DEPLOY_WORKERProvision Runner infrastructure (ECS task definition, IAM roles)
DESTROY_WORKERTear down Runner infrastructure

Environment Stages

Each Spec targets a specific environment:

StagePurpose
developmentDevelopment/testing infrastructure
stagingPre-production validation
productionProduction workloads

The environment stage affects naming conventions, resource sizing defaults, and Terraform state paths.

On this page