Cloud, DevOps & Infrastructure
Infrastructure written down, version controlled and repeatable
Your servers, networks and databases defined in Terraform — reviewable in a pull request, rebuildable from scratch, and no longer stored in one person's memory.
- From
- $1,500–$18,000
- Typical time
- 2–8 weeks
- Usually bought by
- Dev teams
What this actually solves
Infrastructure built by hand is infrastructure nobody can explain. The cloud console makes it easy to create a machine, attach a disk, open a port, add a rule — and it records none of the reasoning. Six months later there is a security group with an unexplained allowance in it, and the two possibilities are that it is load-bearing or that it is a hole. Nobody knows which, so it stays. That pattern repeats until the environment is a collection of settings that exist because they exist.
Then somebody asks for a staging environment that behaves like production. This is the moment the real cost lands. Nobody can build it, because nobody has a complete list of what production consists of. The nearest approximation is assembled by clicking through the console and comparing screens, and it is subtly different in ways that will only reveal themselves when a deployment behaves differently in the two places.
Writing infrastructure as code changes what the environment is. It becomes a set of files in your repository, with a history, an author on every line and a review before every change. It can be diffed, rolled back and rebuilt. And critically it stops being a hostage to one person — the value of an engineer who is the only one who knows how the network was configured is not loyalty, it is risk.
How the work runs
- Import reality before writing anything aspirational. Every existing resource is described in code and imported into state until a plan against production proposes no changes whatsoever. That clean no-op plan is the proof that the code and the running world match, and it is the real deliverable of this phase. Three to seven days.
- Put the state somewhere safe and locked. State goes into a remote backend with versioning and locking enabled, never into the repository — it holds resource identifiers and often secret values in plain text, and two people applying at once against a local file will corrupt it. Access to the backend is restricted separately from access to the code. One to two days.
- Refactor into modules and environments. The repeated pieces become modules with inputs. Development, staging and production become the same code with different variable files, so a difference between environments is a visible line in a file rather than a surprise. Naming and tagging conventions go in here, because they are what makes the billing readable later. One to three weeks.
- Wire it into the pull request. A plan runs automatically on every change and posts its output where reviewers can read it, so the discussion happens over what will actually change rather than over intentions. Apply is gated behind approval and runs from the pipeline using its own credentials, not from a laptop. Three to five days.
- Prove it rebuilds, then prove it detects drift. A disposable environment is created from the code, checked, and destroyed. A scheduled plan runs against production and reports when the running world has diverged from the code, which is how manual console changes get caught in days instead of at the next incident. Two to four days.
What moves the price
How much already exists. Greenfield is faster because there is nothing to reconcile. Importing a mature environment is detective work — every resource has to be found, described, imported and verified, and the ones nobody remembers creating take the longest.
How many environments and providers. One environment on one provider is a contained piece of work. Three environments, two providers and a DNS provider on top means more modules, more state separation and more variables to keep honest.
What Terraform is allowed to own. Networking and compute are straightforward. Bringing databases, DNS and identity permissions under management is more valuable and demands more care, because those are the resources where a careless change is not recoverable by running apply again.
What usually goes wrong
The state file ends up in the repository. It looks like just another project file and it is not — it contains resource identifiers and frequently plaintext secrets, so committing it hands credentials to everyone with repository access. Worse, a state file on individual laptops means two engineers can apply simultaneously and produce two irreconcilable records of what exists, after which Terraform will happily propose creating things that are already there.
An innocuous attribute change forces a replacement. Certain properties cannot be altered in place, so Terraform's answer is to destroy the resource and create a new one. On a security group that is fine. On a production database it is the end of the business. The protection is boring and non-negotiable — stateful resources kept in their own state, marked so they cannot be destroyed, and a plan that is read rather than skimmed.
Nobody reads the destroy count. The plan output states exactly how many resources will be added, changed and destroyed, on one line, before anything happens. It is the single most useful sentence in this entire tool, and after a few weeks of routine changes people stop reading it and type yes. Almost every destructive Terraform accident is printed in full on the screen immediately before it happens.
See where the site stands before you brief anyone.
If the site is already live, start from what it scores rather than from a guess. The audit reports what it checked, what it found, and — the part most tools leave out — what it could not check, and why.
Questions people ask before they commit.
- Our infrastructure already exists. Do we have to rebuild it?
- No. Existing resources are imported into Terraform's state so the code describes what is already running, and the first successful plan is the one that proposes no changes at all. That import phase is the slow part of the work, but it means nothing has to be recreated and no downtime is involved in adopting the tooling.
- Terraform or OpenTofu?
- Either, and the commands and language are effectively the same. Terraform is HashiCorp's product and OpenTofu is the community fork created after the licence change in 2023. If your organisation has a policy on source licensing the decision is already made for you — if not, we would use whichever your team and your existing modules already assume.
- What happens if two people run it at the same time?
- Nothing, provided the state is stored in a remote backend with locking, which is part of the setup. The second run waits rather than corrupting the record of what exists. This is exactly why the state file cannot live on a laptop or in the repository, where two concurrent applies produce two conflicting versions of the truth.
- Can Terraform manage our databases too?
- It can, and it is worth thinking hard about which parts you want it to own. Managing a database's configuration in code is valuable. Giving an automated apply the ability to replace that database is not. We separate stateful resources into their own state and protect them explicitly, so an unrelated change cannot cascade into destroying data.
- Do we need this if we only have one environment?
- Less urgently, but the audit trail still pays. When infrastructure lives in a repository, every change has an author, a date, a reason and a review, and rebuilding after a serious incident becomes a task rather than an archaeology project. The value multiplies the moment you need a second environment, and that moment arrives as soon as somebody asks for a staging copy of production.
- Who can run an apply once this is set up?
- Whoever you decide, and the point of the setup is that it is a decision rather than an accident. The usual arrangement is that anyone can open a change and see its plan automatically on the pull request, while applying to production requires an approval and runs from the pipeline rather than from anyone's laptop.
Often taken together.
Start with the brief, not the invoice.
Send what you are trying to achieve. You get a written scope, a price and a date — or an honest “this is not the right service for that”.
Talk about Infrastructure as Code (Terraform) All Cloud, DevOps & Infrastructure services