Techbanq

Cloud · Terraform

In a good Terraform practice, the estate changes by pull request

Terraform automates whatever discipline it is given — including none. The practice that pays off is modules a team reuses instead of copying, state laid out so parallel work cannot corrupt it, and a review workflow where the plan is read before the estate changes. We build that practice, not just the files.

Serving Saudi Arabia from our Riyadh office and our engineering hubs in Lahore and Karachi

Software team working together at desks in an open office
  1. 01

    Market

    Saudi Arabia

  2. 02

    Written for

    CTO

  3. 03

    Decision

    Build a production Terraform practice, not just Terraform files

  4. 04

    Languages

    EN · AR

Information security for software delivery

  • ISO

    ISO/IEC 27001

    ISO/IEC 27001 certified

Certifications & registrations

The change path

The road an infrastructure change travels before it touches production

Every change to the estate — a firewall rule, a new database, a region setting — travels this path. No step is ceremonial; each one has caught a mistake the later steps could not.

A five-step path — pull request, plan posted, review with policy checks, pipeline-only apply, scheduled drift detection — with a branch requiring any drifted manual change to be imported into code or reverted.

  1. 01

    The change opens as a pull request

    However small, it arrives as code under review — the console is for reading, not changing.

  2. 02

    The plan is posted with the diff

    The pipeline runs the plan and posts it, so the reviewer reads what will happen to the estate, not just what happened to the code.

  3. 03

    Review and policy checks

    A person who did not write it approves it; automated checks enforce tagging, naming and region rules no human should have to remember.

  4. 04

    Apply from the pipeline only

    The pipeline holds the credentials and the audit trail; no laptop ever applies to production, so what ran is always what was reviewed.

  5. 05

    Drift detection closes the loop

    Scheduled plans compare reality to code, so a divergence becomes a ticket the same week rather than a mystery next year.

Always available

When reality has drifted

A manual change found in the estate is either imported into code or reverted — one or the other, that week. What never happens is the third option: leaving it, which is how the code stops being the truth.

Modules and state

A module library is how one good decision becomes every environment’s default

Without modules, Terraform grows by copy-paste: each team duplicates a working configuration, edits it slightly, and within a year the estate has nine versions of the same network layout, each subtly different, none authoritative. A module library inverts that. The decisions worth standardising — how a network is laid out, how a database is configured with backups and region pinning, what every resource must be tagged with — are encoded once, versioned, and consumed everywhere. A new environment inherits a hundred settled decisions on day one, and improving a module improves every consumer on their next upgrade rather than requiring nine parallel edits.

State deserves the same design attention, because it is where Terraform practices die quietly. State lives remotely, encrypted, with locking, and it is split — per environment and per domain — so that a mistake in one corner has a small blast radius and two engineers working in parallel cannot corrupt each other’s ground truth. Whether to adopt infrastructure-as-code at all, and in what order to bring an existing estate under it, is a strategy question our infrastructure-as-code practice covers; this page is about doing Terraform itself well once that decision is made.

The working parts

What a production Terraform practice keeps under version control besides resources

The .tf files that declare resources are the visible quarter. These are the parts around them that make the practice hold under a real team’s parallel work.

The module library

  • Network modules
  • Data-store modules
  • Identity modules
  • Tagging conventions

State discipline

  • Remote backends
  • State locking
  • Per-environment isolation
  • State encryption

The change workflow

  • Plan in review
  • Policy checks
  • Pipeline-only apply
  • Audit trail

Drift and hygiene

  • Scheduled plans
  • Import runbooks
  • Module versioning
  • Upgrade cadence

Our role

What we write in Terraform and what your engineers merge from the first week

  1. 01

    A library, not a pile of files

    We build the module library around your actual conventions — network layout, tagging, region pinning — versioned so environments upgrade deliberately rather than drifting apart.

  2. 02

    The workflow that guards the estate

    We stand up the plan-in-review pipeline, the policy checks and the drift detection, because the workflow is what keeps the code honest after we are gone.

  3. 03

    Your reviewers from week one

    Your engineers review and merge our pull requests from the start, so by handover the practice is already theirs — the alternative, a handover ceremony at the end, transfers files but not judgement.

Which changes need a second approval, and how strict the policy checks run, are risk decisions you own; we build the modules, the state layout and the pipeline that let your team change infrastructure with the same confidence they change code.

Common questions

What buyers ask

Who should be allowed to run terraform apply, and from where?+

For production: the pipeline, and only the pipeline. When applies run from laptops, the estate’s history lives in individual shells — what ran is whatever was on that branch at that moment, with whatever credentials that person held. Pipeline-only apply means every production change passed review, ran against known code, used credentials no individual carries, and left an audit entry. Engineers still apply freely to sandboxes, where iteration speed matters more than ceremony. The line sits exactly where the blast radius starts to include your customers.

How do you keep Terraform state from becoming its own single point of failure?+

By treating it as the production data it is. State lives in a remote backend with versioning, encryption and locking, so a crashed run or two simultaneous applies cannot corrupt it silently. It is split per environment and per domain, so an accident in one corner cannot poison the record of the whole estate, and access to it is scoped — state files contain resource attributes that can be sensitive. And because state can still be lost or damaged despite all of that, we keep the import path rehearsed: knowing you can rebuild state from the real estate is what turns a bad afternoon into an afternoon.

Half our estate was built by hand before Terraform. Import it or rebuild it?+

Import what runs, rebuild what was due to change anyway. Importing brings a hand-built resource under code without touching it, which is the right call for anything stateful or serving production — a database is not recreated to satisfy a tool. Rebuilding through modules suits resources that are cheap to recreate or already scheduled for change, because they come out standardised rather than grandfathered. The order matters more than the method: start with the resources that change most often, since they gain the most from review and drift detection, and leave the static corners for last.

Scope it with us

A working session that maps your current Terraform maturity — modules, state, review, drift — and the shortest path to a practice your engineers run themselves.

Start the conversation