Skip to content
Rivar.

Service

Infrastructure as Code

Module design, state strategy, policy-as-code and drift control — so your infrastructure is reproducible, reviewable and not one apply away from an outage.

The problem

Terraform that everyone is afraid of

IaC that started as a good idea becomes a liability: one monolithic state file, a plan nobody can read, resources imported by hand, and a apply that only one person is willing to run. The code describes the infrastructure, but no longer controls it.

Sound familiar?

  • A single state file for the whole estate, with a 40-minute plan
  • Console changes that nobody codified, so plans are never clean
  • Copy-pasted modules that have quietly diverged across environments
  • No policy gate — a typo can open a security group to the internet

What we do

How the engagement runs

  1. 01

    State and blast-radius design

    We split state along failure and ownership boundaries, so a change to one service cannot plan destruction across another. Remote state with locking, encryption and least-privilege access per workspace.

  2. 02

    Module architecture

    A versioned internal module library with clear inputs, sane defaults and no hidden provider configuration. Composition over inheritance: small modules that do one thing, wired together per environment.

  3. 03

    Policy and security gates

    Checkov, tfsec or OPA in the pipeline, failing the plan on the rules that matter to you — public exposure, unencrypted storage, wildcard IAM — with documented exceptions instead of silent suppressions.

  4. 04

    Drift detection and reconciliation

    Scheduled plan runs that report drift as an alert, plus an import workflow for the resources that were created by hand so the code becomes the source of truth again.

  5. 05

    CI that runs the plan, not a human

    Plan on pull request with the output posted as a comment, apply on merge through a role that only CI can assume. No long-lived cloud credentials on laptops.

What you end up with

Deliverables

  • Refactored state layout with per-boundary backends and locking
  • Versioned module library with examples and generated documentation
  • Policy-as-code gate wired into pull requests, with an exception process
  • Scheduled drift detection reporting into your alerting channel
  • OIDC-based CI pipelines for plan and apply, with no static cloud keys

Tooling

  • Terraform
  • OpenTofu
  • Terragrunt
  • Checkov
  • OPA / Conftest
  • Atlantis
  • GitHub Actions
  • terraform-docs

Engagement shape

Typical length
6-12 weeks for a refactor
Starts with
An IaC health check against your current repo
Team
1-2 senior engineers embedded with your platform team
Scope this with us

FAQ

Infrastructure as Code: common questions

Terraform or OpenTofu?

Both, and the choice is usually commercial rather than technical. The module and state patterns we build are compatible with either, and we can keep your repo portable so the decision stays reversible.

Will you rewrite everything?

No. Rewrites lose institutional knowledge encoded in the existing code. We refactor incrementally behind `moved` blocks and state migrations, keeping every step plan-clean, so you are never in a half-broken state.

How do you handle existing manual resources?

We generate import blocks for them, bring them under management in small batches, and verify each batch produces an empty plan before moving on. Anything genuinely not worth importing gets tagged and documented as out of scope.

Start here

Tell us what is on fire

Or what is merely smouldering. Describe the situation and we will tell you what we would do about it — including when the answer is that you do not need us.

  • A senior engineer reads it, not a sales team
  • A straight answer on whether we can help
  • No obligation, and no follow-up sequence

Prefer email?

hello@rivar.ca

Optional

The more specific, the more useful our first reply will be.

We reply within one business day. No newsletter, no sales sequence.