ADR-INFRA-005 — Cloudflare Infrastructure Bootstrap Protocol
Status: Accepted Date: 2026-10-20 Authors: Engineering & Security Architecture Team
Context
Foundational resources have a chicken-and-egg problem: the state bucket must exist before any other layer can keep its state, and the layer that creates every later credential needs it too. Creating them needs broad rights and repeated trial and error. BRD-INFRA-005 requires a trusted device, hardware approval and revocation. Specified in SR-INFRA-005.
Decision Drivers (FRs & NFRs)
- BR-1.1, BR-1.2 — trusted hardware and per-credential approval.
- BR-1.3 — broad rights only while needed.
- BR-1.4 — nothing long-lived left over.
Options
Option 1 — Pipeline-driven bootstrap
Pros:
- No dependence on one person’s machine or setup.
- Every run is recorded in the pipeline’s history.
Cons:
- Circular: the pipeline needs the state storage that the bootstrap is meant to create.
- Needs the broad bootstrap credential stored as a pipeline secret, exposing it on a remote runner before any guardrail exists (BR-1.1, BR-1.2).
- Slow to debug: each trial-and-error step is a commit and a pipeline run.
Option 2 — Manual console bootstrap
Pros:
- Fast first setup of the state storage and credentials, without writing code.
- Created resources are easy to inspect in the browser.
Cons:
- Leaves no code record of the foundational resources, so they cannot be reviewed, audited or rebuilt the same way twice.
- Hand-made resources drift from the code, which causes subtle permission faults when later modules use them.
- Long-lived administrator credentials are easily forgotten and left active (BR-1.4).
Option 3 — Local bootstrap on the trusted Mac (CHOSEN)
Pros:
- A separate root module run through
op runwith Touch ID gives a hardware root of trust and approval on every credential (BR-1.1, BR-1.2). - The foundation is code in its own module, so it is reviewed in Git and reproducible (BR-1.3).
- The two-hour bootstrap credential is deleted in the password manager and the cloud console once state is in the bucket (BR-1.4).
- Fast local trial and error, with no wait for pipeline runs.
Cons:
- Depends on one administrator and one trusted device during the bootstrap window.
- The first apply uses local state that must be moved with a careful state migration step.
- Needs wider rights than the final roles, so revocation must follow straight away (BR-1.3, BR-1.4).
Final Decision
Bootstrap locally from the administrator’s Mac with Touch ID, using a short-lived credential that is revoked afterwards. Option 1 is rejected as circular and for exposing broad rights on a remote runner, Option 2 for leaving the foundation un-codified, drift-prone and un-auditable. The cost accepted is temporary dependence on one administrator and device, and a manual local-to-remote state migration.