ADR-INFRA-010 — One Account and Two Zones for Both Environments

By Engineering & Security Architecture Team•October 25, 2026•4 min read

Status: Accepted Date: 2026-10-25 Authors: Engineering & Security Architecture Team

Context

ADR-INFRA-004 chose separate accounts for non-production and production. For one small site that means a second bootstrap, a second set of free-tier quotas to keep equivalent and a second state bucket, yet a second account does not itself need a second registered domain, because the default pages.dev host works for a test site. The question is how much separation can be kept inside one account, and which separations ADR-INFRA-004 relied on are lost.

Three provider facts shape the answer. DNS permission is scoped to a zone, not to a record name. Pages deployment permission is scoped to the account, not to one project. Storage permission can be limited to one bucket, not to a path inside it. The free certificate covers the apex and one wildcard level only.

Decision Drivers (FRs & NFRs)

  • BRD-INFRA-009 BR-1.1 — zero running cost.
  • BR-1.4 and BR-1.5 — separate records per environment, and the limits of sharing written down.
  • SR-INFRA-009 SR-F-05, SR-NF-01 and SR-NF-03.
  • BRD-INFRA-004 BR-1.2 and BR-1.4 — assistants never reach production, and a non-production credential does not reach production.
  • BRD-INFRA-008 BR-1.13 — narrow publishing rights.

Decision — How the two environments share the hosting provider

Option 1 — Separate accounts, separate zones

Pros:

  • A non-production credential has no path to production DNS, hosting or storage.
  • Separate quotas, so a runaway test cannot use production’s free allowance.
  • The model already accepted in ADR-INFRA-004.

Cons:

  • Two bootstraps, two state buckets and two sets of free-tier limits to keep equivalent.
  • The extra effort is out of proportion to a single content site run by one administrator.

Option 2 — One account, one zone, separated by hostname

Pros:

  • No cost beyond the one registered domain.
  • One zone to activate and one set of zone settings.

Cons:

  • DNS permission is zone-wide, so a non-production credential can edit every production record.
  • Non-production hosts must be single-level names under the production domain, and a zone-wide setting or cache purge affects both environments.
  • Free-tier rate-limit and custom rules are shared between the environments.

Option 3 — One account, a delegated child zone on a subdomain (Enterprise)

Non-production would live on a subdomain such as dev.<domain>, set up as its own zone with its own zone ID.

Pros:

  • Keeps the corporate naming standard: both environments sit under one brand domain.
  • Two zone IDs, so zone-scoped permission, rules and settings are separate, as in Option 4.

Cons:

  • Needs an Enterprise plan, which breaks the zero-cost driver (BR-1.1). Confirm the plan requirement with the provider before relying on this page.
  • Cannot be built on the free plan at all.

Option 4 — One account, two zones on separate registered domains (CHOSEN)

Pros:

  • Zone-scoped DNS permission separates the environments: the non-production credential is limited to the test zone and cannot edit a production record.
  • Zone settings, rules and certificates are independent per environment, and non-production needs no np. host.
  • One bootstrap, one state bucket and one set of account-level controls to harden.

Cons:

  • A second registered domain is a recurring cost, accepted for the isolation it buys.
  • Pages permission is still account-wide, so a non-production credential holding it could deploy to the production project. Mitigated by keeping publishing in each environment’s pipeline, with its own Pages-only token, and by keeping every non-production credential short-lived.
  • State bucket permission is bucket-wide, so a credential with item-write on the shared state bucket can overwrite another environment’s state. State stays confidential through encryption and separate passphrases, and history/ copies make loss recoverable.
  • Free-tier quotas for R2 and Pages are shared across both environments.
  • Replaces the separate-accounts requirement that BRD-INFRA-004 BR-1.1 and SR-INFRA-004 SR-F-01 expressed. Those documents are updated to match.

Final Decision

Both environments share one account, with production on the production zone and non-production on a separate test zone. Option 1 is rejected for effort out of proportion to the site. Option 2 is rejected because a non-production hostname such as dev.<domain> is only a DNS record inside the production zone, and DNS and settings permission is granted per zone, so the non-production credential could edit production records. Option 3 gives the same isolation under a corporate-style name but needs a paid plan.

Option 4 gets the same structural separation as Option 3 on the free plan by using a second, low-cost registered domain: separate zone IDs, a production credential that cannot touch the test zone, and independent WAF rules and certificates. The price is a second domain name that is not a subdomain of the brand domain. A reader who expects dev.<domain> should read this section: the test domain is separate on purpose, not by oversight.

Subdomain in one zone Subdomain as its own zone Separate registered domain
Example dev.<domain> dev.<domain> <test-domain>
Plan Free Enterprise Free
Zone IDs One, shared Two Two
Zone-scoped permission Covers both environments Separate Separate
WAF, certificate and settings Shared Separate Separate
Meets SR-INFRA-008 isolation No Yes Yes

The cost accepted is a weaker isolation than ADR-INFRA-004 promised: account-wide Pages permission and bucket-wide state permission remain shared. If the site grows, a second account is the exit. ADR-INFRA-004’s decision on AI assistants is unchanged: they are allowed in non-production workspaces only.