DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Building Reliable Async Processing Pipelines Using Temporal
  • Candidate Generation Decides Your Pipeline's Cost, Not the LLM
  • How to Build a Production-Ready RAG Pipeline With Vector DBs
  • Data Pipeline Observability: Why Your AI Model Fails in Production

Trending

  • Building Cross-Team SLO Contracts for Performance Accountability
  • Jeffrey Microscope for Generating Flame Graphs in Java
  • API Facade vs. Orchestration vs. Eventing, Now With AI in the Loop
  • Building Evaluation, Cost Governance, and Observability for a Multi-Agent System in Microsoft Foundry
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. DevOps and CI/CD
  4. Your Automation Pipeline Is Not a Source of Truth

Your Automation Pipeline Is Not a Source of Truth

Pipelines that apply infrastructure changes without a declared source of intent create invisible drift. The pipeline should be the executor, not the authority.

By 
Jeleel Muibi user avatar
Jeleel Muibi
·
Jul. 17, 26 · Opinion
Likes (0)
Comment
Save
Tweet
Share
159 Views

Join the DZone community and get the full member experience.

Join For Free

A CI/CD pipeline that runs without errors creates a sense of correctness. The job is green. The deployment happened. The infrastructure must reflect what it should. This logic feels sound, and it breaks down in a specific way worth understanding.

The pipeline knows what it was told to do at the time it ran. It does not know whether that was the right thing to do. And it cannot tell you whether the state it produced is still aligned with what the organization actually needs, because it has no persistent model of intended state to check against. It ran, it applied, it exited.

When a pipeline becomes the de facto source of truth, the actual authority over infrastructure state is distributed across pipeline history, environment variables, conditionals, and whatever was in the repository at the time of the last run. That is a fragile place to store operational intent.

What a Source of Truth Actually Is

A source of truth is not a pipeline. It is a versioned, human-readable record of what the infrastructure should look like, maintained independently of any single run. The pipeline reads from it and acts on it. The pipeline is not it.

The distinction matters more as the environment grows. A small team with one pipeline can often get away with pipeline-as-truth for a while. The fragility is manageable when the team holds the mental model and the surface area is small. That tolerance disappears at scale, during incidents, or when team composition changes.

Consider what happens during an incident. The question is not “what did the pipeline last apply?” It is “what should this environment look like right now?” If the answer requires tracing pipeline history or reading environment variables buried in CI configuration, the source of truth is inaccessible when you most need it.

The Common Drift Pattern

Drift in this context is not always configuration drift in the Terraform sense, where a resource exists in cloud state but not in code. It is more subtle: a gap between what the pipeline applies and what the organization intends, which is never written down explicitly.

The pattern develops gradually. A variable gets hardcoded into a pipeline stage because changing the input file was inconvenient. A condition gets added to skip a resource in a specific environment. A flag gets added to suppress a Terraform error that kept reappearing. Each change is rational at the time. None of it is recorded as a decision about intended state. The pipeline becomes progressively more opinionated, and that opinion is encoded in logic, not in a readable model anyone can inspect.

This is why a pipeline that passes every run can still represent a system in drift. The runs are consistent. The intent they encode has deviated from what the organization would say it wants, if someone asked.

The drift also accumulates knowledge risk. A new engineer joining the team cannot read the pipeline and understand what the environment is supposed to be. They can only understand what the pipeline will do if they run it. Those are not the same thing, and the difference matters when something needs to change under pressure.

A Simple Corrective Structure

The fix does not require a new platform or a new toolchain. It requires separating the declaration of intent from the act of applying it.

In Terraform terms, this looks like a clear split between variable definition files that describe environments and the pipeline logic that applies them.

Shell
 
environments/
  production.tfvars
  staging.tfvars
  dr.tfvars
pipeline/
  apply.sh


The .tfvars files are the source of truth. They describe the intended state of each environment. The pipeline reads them and applies. Any change to what an environment should look like goes through the variable file first, through version control, through review. The pipeline reflects intent; it does not define it.

This pattern extends to more complex inventory structures. HybridOps uses a similar model, where environment inventory files define the operational state and pipeline jobs are written to consume those definitions rather than encoding intent directly in pipeline logic.

The result is that looking at the inventory or variable files gives a direct answer to “what should this environment look like?” without tracing pipeline history or reading conditional logic.

Reviewing Your Own Setup

A practical way to check whether your pipeline has become the source of truth: if the pipeline repository were deleted today, could a new engineer reconstruct the intended state of each environment from the infrastructure code alone?

If the answer is no, or not without significant effort, the pipeline is carrying intent that belongs in declared configuration. That is the part worth extracting.

It is also worth asking how many decisions about intended state live in pipeline conditionals. Every if ENVIRONMENT == "production" block in a pipeline script is an opinion about what production should look like. That opinion deserves to be in infrastructure code, reviewed like any other infrastructure change, not buried in deployment logic that only runs at apply time.

A pipeline that applies changes cleanly is genuinely useful. It becomes a liability when it is also the only place intent is recorded. The reliability of the system comes from the fact that intent is declared somewhere stable, not from the fact that the pipeline is fast.

Build pipelines that read intent. Store intent somewhere readable. That division is simple to state and consistently worth enforcing.

Pipeline (software)

Published at DZone with permission of Jeleel Muibi. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Building Reliable Async Processing Pipelines Using Temporal
  • Candidate Generation Decides Your Pipeline's Cost, Not the LLM
  • How to Build a Production-Ready RAG Pipeline With Vector DBs
  • Data Pipeline Observability: Why Your AI Model Fails in Production

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook