00 · Gravity Keep
Say what should be true. Gravity Keep keeps it there.
An AWS control plane configured the way a network device is. Edit a candidate, check it, commit it, and the control plane pulls your cloud into line. Then it keeps it in line, every minute, whoever reaches for the console.
The idea
Three things are first-class.
A network engineer changes a router by editing a candidate configuration, checking it, and committing it, with a number, a comment, and a way back. Gravity Keep brings that discipline to AWS, and adds what a router never needed: a cloud that keeps moving after the commit.
One configuration for everything.
Namespaces are branches you name yourself. Resources are the leaves. Settings declared on a branch flow down to everything beneath it.
The only way anything changes.
Atomic in the tree, checked before it lands, numbered, attributed, and kept forever. A bad one is undone by a commit too.
AWS is pulled into line, and kept there.
Reactors compare what AWS holds with what the tree says, and act on the difference, from every commit and every change anyone else makes.
The loop
Events say where to look. State says what to do.
A commit starts convergence. A change in the console arrives as a CloudTrail event a few minutes later. Either way, a reactor reads the resource from AWS, compares it with the tree, and acts on the difference, so a late, lost, or forged event does no harm.
A scheduled sweep reads every managed resource as well, in case an event never came.
Why build it
The costs Terraform and CloudFormation leave you with.
Both are good tools. Both share habits that cost real teams time, and Gravity Keep is designed around each one.
| Pain | What happens today | What Gravity Keep does |
|---|---|---|
| Drift is found late | At the next plan, often in the middle of an unrelated change | Found within minutes from CloudTrail, with the name of whoever made it, and handled by policy |
| State lives in a file | A state file and a lock table that can be corrupted, split, or lost | Desired state is rows with full history; observed state is read from AWS; there is no third copy |
| Hierarchy is simulated | Directories, workspaces, provider aliases, and module wiring | The hierarchy is the configuration: placement is inherited |
| Common settings are copied | Encryption and tags repeated in every module call, or checked after the fact | Stated once as defaults and guardrails |
| Moving things is surgery | state mv and careful imports | A move or rename is one commit and never replaces a resource |
| Changes that lock you out | A bad security group cuts off the people who would fix it | commit confirmed 10 reverts unless you confirm it worked |
A first session
If you've configured a Junos router, you already know it.
Two modes, edit and set, show | compare, commit check, commit, rollback. The client is gkeep; the same session runs in a browser terminal, and pipelines call the same API.
The plan is computed against what AWS holds now, not against a state file, and every action is recomputed again just before it runs.
$ gkeep tidewater Gravity Keep 0.2 control plane tidewater active COMMIT-41 eric@tidewater> configure [edit] eric@tidewater# edit /tidewater/lending/dev [edit /tidewater/lending/dev] eric@tidewater# set resource s3.bucket documents bucket-name tidewater-lending-dev-documents eric@tidewater# set resource s3.bucket documents versioning-configuration status Enabled eric@tidewater# commit check configuration check succeeds plan against observed state as of 09:14:02: create 1 /tidewater/lending/dev/s3.bucket/documents tags + managed-by=gravity-keep + application=lending + environment=dev eric@tidewater# commit and-wait comment "Pilot: Lending dev documents bucket" commit complete: COMMIT-42 /tidewater/lending/dev/s3.bucket/documents stable (6s)
The chapters
Read in order, or jump to the question you have.
Tree
Namespaces, placement, defaults and guardrails, templates, and who writes each branch.
02Commit
Candidates, commit check, commit confirmed, rollback, revert, and review.
03Orbit
Convergence, the five states, waiting, and the type table.
04Drift
Changes made outside a commit, comparisons that hold up, and holds for emergencies.
05Supervision
Adopt, explore, learn, evict, and deleting without losing data or identity.
06Architecture
How it's built on Lambda, Step Functions and Postgres, and how it manages itself.
07Adopting
From Terraform a stage at a time, and an honest comparison with the alternatives.
What it is not
Deep on AWS, and nothing else.
- Not multi-cloud. Terraform remains the better tool for estates that span clouds and SaaS.
- Not a programming environment. Templates substitute typed parameters. There are no loops, conditionals, or expressions.
- Not a deployment pipeline. A pipeline loads a reviewed configuration and commits it, as it applies Terraform today.
- Not a substitute for service control policies. Guardrails are checked at commit; SCPs are enforced by AWS on every call.
- Not a backup system. A rollback restores configuration, never data, and says so.
The worked example
Tidewater.
Every example follows Tidewater, the fictional lender from Gravity Standard: an organization, a foundation account, and three applications in production. Its whole tree and ten worked sessions are published with the full documentation.
Gravity Keep fits the Standard without depending on it, and the Standard never depends on Gravity Keep.
Draft 0.2. Gravity Keep is a proposed design, not a released product. It is independent of, and not affiliated with, Amazon Web Services or Juniper Networks. AWS service names are trademarks of Amazon; Junos is a trademark of Juniper Networks; Terraform is a trademark of HashiCorp.