eleven / messenger Public

Clone
git clone https://amadan.net/eleven/messenger

Plain git — no account needed to clone.

Download

Download this file

1# πŸ€– infra/ β€” the Eleven Cloud IaC skeleton
2
3OpenTofu for the AWS side of the planet-scale plan (issue #550). This layer
4manages the **static skeleton only** β€” buckets, IAM, and (later) VPC/NLB/ASG.
5All intelligence lives in the `lchat` binary; the boundary test from the plan
6holds for every change here: **if the IaC needs to know an instance hostname,
7the design is wrong.**
8
9## Environments
10
11- `dev/` β€” the proof-of-concept environment in the dev account
12 (`427880590669`, eu-west-1, AWS profile `eleven-dev`). Test data only:
13 nothing in this account is production, and the production fleet stays on
14 the router box until #550's build triggers fire.
15
16## Running
17
18```sh
19cd infra/dev
20AWS_PROFILE=eleven-dev tofu init
21AWS_PROFILE=eleven-dev tofu plan
22AWS_PROFILE=eleven-dev tofu apply
23```
24
25State lives in S3 (`eleven-tofu-state-427880590669`, versioned, private) with
26native lockfile locking β€” no DynamoDB lock table needed. That bucket is the
27one imperatively-created resource (chicken and egg); everything else is
28declared here. Being hand-managed, its hardening is hand-applied too: full
29Block Public Access, and a `DenyInsecureTransport` bucket policy (deny on
30`aws:SecureTransport=false`, applied 2026-07-15) matching the TLS-only
31policy every declared bucket carries β€” reapply both if the bucket is ever
32recreated.
33
34## What exists (dev)
35
36- `eleven-dev-instances-…` β€” the instance-state bucket: Litestream replication
37 targets, one prefix per instance. Versioning on, lifecycle keeps the last 5
38 noncurrent versions, Block Public Access. Instance DBs are opaque ciphertext
39 plus routing metadata the server already sees, so replicating them here is
40 threat-model-free (the E2EE rule did the hard part).
41- `eleven-dev-home-…` β€” the home vault bucket for the `s3Store` backend work
42 (#550 Part 1): same posture.
43- A scoped `litestream-canary` IAM user/policy confined to the canary's prefix
44 β€” the shape per-instance credentials will take; the admin `dev-agent` and
45 `dev-agent-james` users (one per operator; James's key is sealed in the
46 secrets vault) are console-made and not managed here.
47