03 · Orbit
The commit returns. AWS catches up.
A database takes fifteen minutes; a certificate waits for DNS. So a commit returns as soon as it's written, the work runs in the background, and every resource in the tree shows where it stands and who has to act.
Convergence
Plan, act one resource at a time, read back.
- Compare the resolved configuration with what AWS holds for each affected resource.
- Order the actions by references: creates outward from what is referenced, deletes the other way.
- For each action, re-read the resource, recompute the action, send one Cloud Control request, wait for it, and read the result back.
- Record how each action ended, and update each resource's state.
Convergence always works toward the latest configuration, so a superseded commit can never undo a newer one. A resource has at most one AWS request in flight: a change from a newer commit waits for it, then is recomputed. Retries are bounded, and a failure waits for a person rather than looping.
depends_on; if an order matters and no property says so, the template is missing a reference.The five states
Each state says who has to act.
Every managed resource is in exactly one state, shown with a short reason. Drift that the control plane is already correcting shows as converging, so drifted always means the difference will stay until a person does something. That's the state worth alarming on.
Observed matches configured.
Nobody actsCreating, updating, waiting on a reference, pending validation, or correcting drift.
The control plane, on its ownDifferent, and it won't be corrected on its own: report policy, a hold, a fight, a missing stateful resource.
A person decidesAWS refused, retries ran out, a referenced resource failed, or the type's converging limit passed.
A person fixes itThe account can't be read, so the control plane won't claim anything.
A person restores accesseric@tidewater> show status /tidewater/lending/prod/east acm.certificate/cdn converging pending validation (DNS, 4m) route53.record-set/cdn-validation stable cloudfront.distribution/site converging waiting on acm.certificate/cdn rds.db-instance/main converging creating (COMMIT-47, 6m, about 15m expected) ec2.security-group/intake converging correcting drift (sam, console) s3.bucket/documents drifted hold 3, until 00:41 cloudwatch.alarm/errors failed blocked by lambda.function/fn
A namespace shows the worst state beneath it, in the order unknown, failed, drifted, converging, stable, with counts. show configuration | display status annotates the whole tree.
Waiting
Walk away, or wait for it.
A person who wants the prompt back when AWS is done uses commit and-wait. A pipeline uses wait, which ends with an exit code it can act on. A wait in a session is a subscription; from a pipeline it's a long poll that never holds a Lambda open.
Commit check shows how long the slow actions usually take, so you know before you commit whether it's a six-second bucket or a fifteen-minute database.
| Command | Waits until |
|---|---|
commit and-wait | The commit's convergence finishes |
wait commit 47 | Everything it affected is stable, or it fails or is superseded |
wait /tidewater/foundation/prod | Everything beneath is stable, whatever made it otherwise |
| Exit | Meaning |
|---|---|
| 0 | Stable |
| 1 | Failed |
| 2 | Timed out while converging, drifted, or unknown |
| 3 | Superseded by a newer commit |
The type table
What the registry schema doesn't say.
Most types need only Cloud Control and the first three columns. The rest exist for the few that behave unusually, and stay empty until a type needs them. A type is offered for owned namespaces only once it has run in report mode without showing drift nobody caused.
| Column | Says | Example |
|---|---|---|
| Scope | Global, regional, zonal, or organization | acm.certificate: regional |
| Stateful | Removing it loses data, or something as costly | route53.hosted-zone: yes |
| Identity | What others hold that recreating can't restore | iam.role: unique ID |
| Runner | Cloud Control, or a hand-written runner for a type with special needs | acm.certificate: acm-certificate |
| Converging limit | How long it may stay converging before it's failed | acm.certificate: 72h |
| Typical duration | What commit check shows | rds.db-instance: about 15m |
| Early attributes | Values that can be referenced while it's still converging | a certificate's validation record |
| List keys | How list entries are picked, never by position | validation[www.tidewater.com] |
| Comparison | The normaliser applied before comparing | policies: json; rules: set |
| Destroy values | What deletion needs | kms.key: waiting period |
Early attributes
A certificate, pending, and the record it's waiting for.
An ACM certificate stays pending until its DNS validation record exists, and that record's value comes from the pending certificate. Strict ordering would deadlock. So the certificate stays converging, "pending validation", while its validation values are marked early in the type table: the record that reads them is created at once.
Anything that reads the certificate's ARN still waits for it to be stable, because CloudFront refuses a certificate that hasn't been issued. ACM gives up after 72 hours, and so does the converging limit.
resource acm.certificate cdn { placement { region us-east-1; } domain-name lending.tidewater.com; validation-method DNS; } resource route53.record-set cdn-validation { hosted-zone-id @/tidewater/foundation/prod/route53.hosted-zone/tidewater-com; name @./acm.certificate/cdn:validation-record-name; early type CNAME; ttl 300; resource-records [ @./acm.certificate/cdn:validation-record-value ]; }
The rules
Convergence.
- CTL-025
Convergence always works toward the latest active configuration, and every action is recomputed from the resource's current state just before it runs.
- CTL-026
Each convergence action is retried a bounded number of times with backoff, and then recorded as failed with an alarm to the resource's owner.
- CTL-059
A resource has at most one AWS request in flight; an action from a newer commit waits for it to finish and is then recomputed from current state.
- CTL-060
Every managed resource is in exactly one state,
stable,converging,drifted,failed, orunknown, shown with its reason, and a namespace shows the worst state beneath it in the order unknown, failed, drifted, converging, stable. - CTL-062
A wait succeeds only when everything it waits on is
stable;driftedandunknownnever count as stable. - CTL-064
Every type has a converging limit in the type table, and a create or update still
convergingwhen it runs out isfailed.