Join our Newsletter — 33% off our NHI Course

How do teams know whether infrastructure as code is actually controlling production?

They should test whether any production change can happen outside the code pipeline, whether those exceptions are tracked, and whether the resulting state is still provably compliant. If manual paths remain, IaC is advisory rather than controlling.

What “controlling production” actually means in an IaC programme

Infrastructure as code is controlling production only when the code pipeline is the enforceable path for change, not just the preferred path. That means the live environment cannot be altered freely by consoles, hotfixes, or ad hoc scripts without detection and review. If those paths still exist, the codebase may describe production, but it does not govern it.

The practical test is simple: compare the declarative source of truth with the observed runtime state and the authorised change paths. If production consistently converges to what the pipeline declares, IaC is doing control work. If operators can bypass it, or if drift is tolerated as normal, then IaC is advisory and the real control sits somewhere else.

Teams should also distinguish between “managed by code” and “fully controlled by code.” Many environments have modules, templates, or pipeline checks, but still leave emergency access, cloud-console edits, or unmanaged exceptions. That is a weaker operating model because it depends on people behaving well, not on the system making the unsafe path hard or obvious.

How to test whether production can still change outside the pipeline

The most reliable check is to attempt to identify every production-changing path and prove which ones are blocked, logged, or reconciled. A control test is not only whether the pipeline works, but whether any alternate route can actually change the state of infrastructure, networking, IAM, secrets, or compute without being forced back through code.

Good evidence usually comes from a mix of technical and procedural signals: deployment permissions scoped to the pipeline identity, policy controls that reject manual drift, immutable or monitored change records, and a reconciliation process that flags exceptions quickly. The question is not whether a manual change is possible in theory, but whether it can survive in production without becoming a tracked exception.

When teams claim that IaC is controlling production, they should be able to show that a manual change either fails, is immediately detected, or is converted into code before it persists. If the only proof is that “we usually do it through the pipeline,” the control is cultural, not enforced.

For broader control assurance, NIST Cybersecurity Framework 2.0 is a useful mapping for governance, protect, detect, and recover expectations around change control, while NIST SP 800-53 Rev 5 Security and Privacy Controls gives more explicit control language for configuration management, access control, auditability, and change tracking.

What evidence proves IaC is the real source of compliance

Control is strongest when compliance can be demonstrated from the running state, not only from the repository. In practice that means the deployed environment should be continuously checkable against declared policy, so the team can prove that production still matches the intended configuration after each change window, incident, or exception.

That proof should include three things: the accepted baseline, the exception record, and the current reconciled state. If a deviation exists, the team should know who approved it, why it exists, when it expires, and whether the post-change state remains compliant. Without that chain, the pipeline may be efficient, but it is not the compliance authority.

This is where drift detection matters. A mature IaC posture does not just deploy successfully; it also surfaces unauthorized or accidental changes and closes the loop by restoring the declared state or documenting the variance. That is the difference between a deployment tool and a control plane.

External guidance on configuration and change discipline is especially relevant here. CSA Cloud Controls Matrix is helpful for cloud control mapping, and NIST Cybersecurity Framework 2.0 remains a practical way to frame whether change governance, monitoring, and recovery are actually functioning.

Risk and Threat Considerations

When IaC is only advisory, production drift becomes an attack surface and an accountability problem. The risk is not limited to operational inconsistency, because manual paths can be used to introduce insecure settings, bypass guardrails, or hide unauthorised changes inside a process that was assumed to be controlled.

Failure mechanism: Bypass paths, temporary fixes, and untracked exceptions let live infrastructure diverge from code, so the declared state no longer matches the enforced state.

Impact: Teams lose provable compliance, incident response becomes slower, and attackers or insiders may exploit the same manual paths to persist changes outside normal review.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST CSF 2.0, NIST SP 800-53 Rev 5 and CSA Cloud Controls Matrix set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

Framework Control / Reference Relevance
NIST CSF 2.0 GV.OC-03 — Cybersecurity Supply Chain Risk Management IaC control of production depends on governed change paths and trusted delivery chains.
ID.IM-01 — Improvements are identified and prioritized Drift and manual exceptions must be surfaced and tracked for remediation.
Recommendation — Define approved change paths and verify production changes flow only through them. Track drift findings and convert recurring exceptions into prioritized fixes.
NIST SP 800-53 Rev 5 CM-3 — Configuration Change Control Production control hinges on approved, tracked, and enforced configuration changes.
CM-6 — Configuration Settings IaC must enforce the intended baseline, not just document it.
AU-6 — Audit Review, Analysis, and Reporting Manual exceptions and bypasses need reviewable evidence and alerting.
Recommendation — Require approved change control for every production modification. Continuously enforce secure baseline settings through code and policy. Review logs for out-of-band production changes and unresolved exceptions.
ISO/IEC 27001:2022 A.8.9 — Configuration management IaC control is fundamentally configuration management over live production.
A.8.32 — Change management Production changes must be formally authorized and tracked, not ad hoc.
Recommendation — Maintain controlled baselines and detect unauthorized configuration drift. Authorize, test, and record every production change through managed change control.
CSA Cloud Controls Matrix CIS — Configuration and change management Cloud production control depends on enforcing and monitoring configuration changes.
Recommendation — Use policy and drift monitoring to keep cloud production aligned to code.

Practitioner Guidance

What to verify: Validate the control by testing a real production change request against every non-pipeline path, including console edits, emergency access, and scripted changes. If any path can alter state without an immediate alert or enforced reconciliation, treat IaC as incomplete control.

What good looks like: The pipeline is the default and preferred path, but the stronger signal is that exceptions are rare, time-bounded, approved, and measurable. Teams should be able to point to a current exception register, a drift report, and a clear owner for restoring compliance.

Common mistake: Equating successful deployments with control. A pipeline that can apply changes does not prove that nothing else can, and a clean repo does not prove that the running environment still matches it.

Practitioner takeaway: IaC controls production only when bypasses are either prevented or made operationally visible, because compliance depends on enforced state, not on the intent of the last approved merge.