Skip to content
EncryptTechBD
Home Industries Our Work Blog Pricing About Contact Discuss Your Project
বাংলা (BN)
Cloud, DevOps & FinOps 6 min read

Infrastructure as code governance: four models compared

Review-only, policy-as-code, platform modules and managed run environments compared on control, speed and audit evidence.

E
EncryptTechBD · 0 comments
Businesswoman working on a laptop
Photo: Burst / StockSnap

Infrastructure as code solves the "nobody knows what is running" problem and creates a new one: nobody knows who is allowed to change it. Governance is the set of controls around the code: review, policy, state, approvals and evidence. It decides whether the platform is auditable or just automated.

This comparison covers four governance models used by mid-sized teams. It is written for the CTO or operations lead who has two to six engineers and a growing cloud bill, not for an enterprise platform organisation with fifty specialists.

The four models

1. Review-only

A pull request, one reviewer and a written convention document. The pipeline runs a plan and posts it as a comment.

  • Strengths: cheapest to start, low friction, familiar to any team using Git.
  • Weaknesses: the reviewer is the only control. A tired reviewer approves a production database deletion, and the plan output is often too long to read.
  • Fit: one team, one cloud account per environment, few changes per week.

2. Policy as code in the pipeline

Static analysis and a policy engine evaluate the plan before apply. Rules block public buckets, unencrypted volumes, overly broad roles or untagged resources.

  • Strengths: consistent enforcement, fast feedback, and a written rule set that doubles as documentation.
  • Weaknesses: policy maintenance becomes its own backlog, and poorly written rules block legitimate work until people learn to bypass them.
  • Fit: any team with more than one engineer and a shared cloud account.

3. Platform team and golden modules

A small platform group owns versioned modules, environment definitions and pipelines. Product teams consume modules rather than writing raw resources.

  • Strengths: small blast radius, consistent architecture, far less duplicated code.
  • Weaknesses: the platform team becomes a queue. If they are also on call, module requests wait.
  • Fit: three or more product teams sharing infrastructure, or a regulated environment with a fixed architecture.

4. Managed run environment

Remote state, a controlled run environment, approval gates, drift detection and an audit trail are provided by a platform such as Terraform Cloud, Atlantis or Spacelift.

  • Strengths: strong evidence trail, consistent runs, no state file on a laptop, built-in approval records.
  • Weaknesses: another vendor, another bill and another access model to review. Exit requires exporting state and rebuilding the pipeline.
  • Fit: auditor-facing environments, distributed teams, or teams that keep losing state.

Criteria that separate them

  • Control strength: model 2 and model 4 are strongest because enforcement is mechanical. Model 1 depends entirely on the reviewer.
  • Developer speed: model 1 is fastest for small changes. Model 3 is fastest at scale once modules exist, and slowest before they do.
  • Blast radius: model 3 limits it through module boundaries and separate accounts. Model 1 limits nothing.
  • Drift detection: only model 4 provides it out of the box; elsewhere it is a scheduled job you build.
  • Audit evidence: model 4 records who approved what and when. Models 1 and 2 rely on Git history, which is good but does not capture apply-time context.
  • Skills required: models 1 and 2 need Git and cloud literacy. Models 3 and 4 need someone who can own a platform.
  • Cost structure: models 1 and 2 are mostly engineering time. Model 3 is engineering time plus a platform owner. Model 4 adds a subscription priced by runs, resources or users.

Decision guidance

Most teams should not pick one model. A practical combination is policy as code plus a small set of golden modules, with a managed run environment added when the audit requirement arrives.

  1. One team, one cloud, under ten changes a week: review-only with a mandatory plan comment. Add policy checks for the three failures that would hurt most.
  2. Two or three teams sharing accounts: policy as code, separate accounts per environment, and modules for the resources that are always built the same way.
  3. Audit or customer due diligence: managed run environment with approval gates, plus policy as code inside it, plus an evidence export reviewed quarterly.
  4. Regulated or multi-cloud: all four, with the platform team owning the module catalogue and the policy library.

The parts people forget

  • State security. The state file contains secrets in plain text. Encrypt it, restrict access, and enable locking so two applies cannot race.
  • Environment boundaries. Separate accounts or subscriptions are a stronger control than naming conventions in one account.
  • Break-glass access. A documented, time-limited, logged path for the day the pipeline is broken. Without it, engineers create permanent admin credentials "just in case".
  • Module versioning. Pin versions, publish a changelog and deprecate on a schedule. Unpinned modules make every apply unpredictable.
  • Drift ownership. Someone must own the weekly drift report, or the report becomes decoration.
  • Cost visibility. Tagging rules belong in policy, not in a spreadsheet reviewed at quarter end.

The local team reality

Most mid-market companies in Bangladesh do not have a platform team, and hiring one is not realistic in the short term. That makes the hybrid path the practical one: policy as code in the existing pipeline, two or three modules owned by the most senior engineer, and a managed run environment only when an auditor or enterprise customer requires the evidence.

A 60-day adoption plan

  1. Week 1-2: inventory repositories, state files, cloud accounts and who can apply to production.
  2. Week 3-4: move state to remote storage with locking, and remove local state from laptops.
  3. Week 5-6: add plan comments and three blocking policies: public storage, unencrypted volumes, wildcard permissions.
  4. Week 7-8: extract two or three golden modules and migrate one service as the reference implementation.

Metrics

  • Percentage of infrastructure changes applied through the pipeline.
  • Policy violations caught before apply, and violations found after.
  • Drift detected per month and time to reconcile.
  • Number of standing production credentials.
  • Lead time from pull request to applied change.

Where this fits in our work

If you want the controls designed around your current repositories, start with Managed Technology & Cybersecurity; the pricing page explains how platform work is scoped. For the commercial side of the same decisions, read how cloud vendor lock-in changes year by year.

Sources

Services that deliver this

Want this implemented properly?

Pricing →

Every engagement starts with a written scope. If a requirement is outside it, we quote it separately before starting.

Responses (0)

No comments yet. Add the first one below.

Leave a response

Your email address will not be published. Required fields are marked *.

Keep reading

More field notes