Infrastructure release engineering
Release the reviewed change, not whatever is newest
Infrastructure release engineering is the controlled process of promoting reviewed infrastructure artifacts to an intended environment and verifying the resulting service. The goal is repeatable change with evidence, clear ownership and a recovery path. An approval of one plan is not approval of a newly generated plan.
Northwind's storage update is reviewed in staging, with the intended production scope recorded separately. A new plan shows that the database would be replaced. The correct action is to stop, inspect the replacement reason, estimate downtime and data consequences, and get a new design reviewed. Do not reuse the original approval.
Design the release chain
Reviewed commit + dependency selections -> isolated build / validation -> target-scoped plan + sanitized summary -> policy and integration evidence -> independent approval bound to plan and environment -> verify unchanged identity, freshness, scope and drift -> authorized bounded apply -> smoke, security and recovery-related verification -> promote / pause / recover and reconcileUse a separate, least-privileged deployment identity and protect the workflow definition. Pin reviewed module versions or immutable references and provider selections/checksums; module pins and provider lockfiles cover different dependencies. Verify downloaded artifacts against trusted source and integrity expectations. A checksum alone does not establish who built the artifact. A software bill of materials (SBOM) lists components; build provenance records how an artifact was produced. Verify attestations against a trusted builder identity, source revision, expected build parameters and the artifact digest. SLSA build provenance v1.2 is a useful specification, not a certification achieved by merely adding metadata. SLSA build provenance.
Bind approval to the actual plan artifact digest, environment identifiers, input/config revisions, policy and evidence revisions, and an expiry. A privileged controller must verify signatures, identity and freshness and prevent unauthorized modification of approval records. Replanning, changed inputs, a policy update or newly detected drift may invalidate the approval. Serialize competing changes, use appropriate state locking and observe current state before mutation. The exact guarantees depend on the backend, provider and operation; no general atomic deployment is promised.
Review a synthetic diff
| Resource | Action | Risk and decision |
|---|---|---|
| api-worker | update 2 to 3 replicas | Check quota, health, scaling and cost |
| orders-db | replace | Stop; validate data migration and recovery before a new approval |
| audit-store | delete | Stop; verify retention and dependencies |
| private-link | create; final endpoint unknown | Hold pending approved network evidence |
| app-output | update | Inspect only sanitized metadata; restrict secret-bearing original |
A plan that replaces a stateful resource may create new infrastructure before removing the old, but that does not automatically copy data, preserve identity or guarantee continuity. Review downstream references, attachment changes, temporary capacity, billing overlap, service limits and write consistency. A planned delete might be legitimate after retirement approval; it is not automatically safe just because a tool proposes it. Separate destructive changes into their own approved change windows when practical.
CloudFormation change sets, Azure what-if and Google Infrastructure Manager previews can help expose consequences, but they do not prove future capacity, authorization or application health. Actual plans may require live access and must be generated only in the approved environment. CloudFormation change sets.
Detect drift and prepare recovery
Drift is the difference between the expected infrastructure configuration and observed configuration. An emergency change, failed deployment or unmanaged actor can produce drift. A provider may not report every property or resource type. CloudFormation drift detection, for example, has limits for resource coverage and properties not explicitly configured. Record observed scope, time, unavailable properties and the resource revision. An unknown check is not a clean result. CloudFormation drift detection.
If a plan becomes stale, reconcile desired, recorded and observed state. Determine whether the external change is authorized before deciding to adopt it or revert it. Do not auto-apply to erase every drift finding. If a failed apply partially changed resources, inventory actual state and evaluate the remaining steps; blind retry or state deletion can compound the incident. A state lock prevents certain competing operations but is not a universal lock on cloud APIs.
Rollback of code or configuration does not necessarily undo database schema changes, accepted writes, deleted data or external side effects. Specify compatible versions, backups, restore drills, writer fencing, rollback deadline and the owner authorized to decide between rollback and roll-forward. Keep a known-good artifact and validate recovery on representative data. A failed canary stops promotion; it does not automatically authorize destructive compensation.
Run a local release and canary gate
The code below compares fictional plan identifiers and pre-reviewed evidence states. plan-A is a label, not a cryptographic digest. The function does not verify identities, provenance, scope, expiry or actual drift; in a real controller those facts must be derived from trusted sources. It never deploys anything. The canary helper checks only an error fraction; it treats 0.5% as an inclusive threshold with a minimum 1,000 observations. One basis point equals 0.01 percentage points.
def release_gate(reviewed, current, evidence, *, stateful_change=False): # Fictional evidence, not a cryptographic signature verifier. keys = ("policy", "integration", "provenance", "approval", "rollback", "scope") if not reviewed or not current: return "HOLD: missing plan identity" if reviewed != current: return "HOLD: plan changed" if evidence.get("drift") != "clear": return "HOLD: drift unresolved" for key in keys: if evidence.get(key) is not True: return "HOLD: " + key if stateful_change and evidence.get("restore") is not True: return "HOLD: restore" return "READY FOR AUTHORIZED REVIEW"
def canary(total, errors, minimum=1000, limit_bp=50): # 50 basis points = 0.5%; compare integers exactly. if any(type(x) is not int for x in (total, errors, minimum, limit_bp)): raise ValueError("integer counts required") if total < 0 or errors < 0 or errors > total or minimum <= 0 or not 0 <= limit_bp <= 10000: raise ValueError("invalid observation") if total < minimum: return "HOLD: insufficient sample" if errors * 10000 > total * limit_bp: return "STOP: error threshold" return "PASS: error check only"
evidence = dict(policy=True, integration=True, provenance=True, approval=True, rollback=True, scope=True, drift="clear", restore=True)print(release_gate("plan-A", "plan-A", evidence, stateful_change=True))print(release_gate("plan-A", "plan-B", evidence))print(canary(1000, 5))print(canary(1000, 6))print(canary(200, 0))Expected output:
READY FOR AUTHORIZED REVIEWHOLD: plan changedPASS: error check onlySTOP: error thresholdHOLD: insufficient sampleThe first decision is a review candidate, not deployment permission. The second detects a changed plan. Five errors out of 1,000 meet the fictional 0.5% limit exactly; six exceed it. Zero errors in 200 requests is insufficient for this model. Real release decisions also use latency, saturation, business checks, comparison with baseline, request mix, window duration and guardrails for low traffic. A sample count is not a statistical guarantee. In infrastructure changes a small canary may mean a separate deployment stamp rather than a traffic percentage; shared dependencies can still make an incident global.
Practice: assemble a release evidence packet
Prepare a fictional packet containing target scope, commit, artifact identity, planned actions, policy revision, test results with times, sanitized cost impact, approval identity, expiry, rollback/restore evidence and monitoring thresholds. Run the gate with unknown drift, missing provenance, missing restore evidence for a stateful change and a changed plan. Then check 2,000 observations with 10 and 11 errors. Both use the same threshold: 10 meets it, 11 exceeds it. Explain why no successful local test proves real cloud enforcement.
Common mistakes: approving a summary instead of the exact change, treating missing checks as pass, exposing state in logs, assuming rollback restores data, ignoring stale evidence and counting a passing preview as a passing production deployment. Keep release records and actual observed outcomes separate. Next: Cloud architecture portfolio and certification readiness.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Infrastructure release engineering — knowledge check
Choose the best answer for each offline scenario.
An approved plan is regenerated with a different identity. What next?
What does provenance provide when verified against trust expectations?
A drift check does not cover a resource property. What is its evidence state?
The canary has 1000 observations and six errors, with a 0.5% threshold. What is the result?
Why may a configuration rollback be insufficient after a DB migration?