Terraform Infrastructure Setup
New cloud environments defined as code from the start: networks, compute, databases, IAM and monitoring, in reusable modules.
TECHNOLOGY
Reusable modules, remote state that a team can share safely, and a path out of infrastructure that was clicked together in a console for USA teams who want environments they can rebuild.
The four engagements that most often start a Terraform project.
New cloud environments defined as code from the start: networks, compute, databases, IAM and monitoring, in reusable modules.
Bringing resources that were built by hand under Terraform management, without downtime or recreating them.
Plans reviewed in pull requests, applies run from CI, and policy checks that stop risky changes before they reach production.
Providers built with the Terraform Plugin Framework for internal platforms and APIs that have no official provider.
Terraform is an infrastructure as code tool: you describe cloud resources in configuration files, and Terraform creates, changes or removes them to match. Servers, networks, databases, DNS records, IAM roles and Kubernetes clusters all become code that is reviewed, versioned and repeatable.
It works through providers — plugins that translate Terraform configuration into API calls for AWS, Azure, Google Cloud, Kubernetes and hundreds of other platforms. One workflow covers all of them, which is why Terraform is common in multi-cloud and hybrid setups.
The day-to-day loop is simple: write configuration, run terraform plan to see exactly what will change, review that plan, then terraform apply. The value is in the plan. Nobody changes production without seeing, in advance, what is about to happen.
Terraform development is designing that code so it stays safe and readable as infrastructure grows. For pipelines, release engineering and cloud operations around it, see DevOps and cloud engineering.
Terraform keeps a state file: its record of which real resource matches which block of configuration. Most serious Terraform problems are state problems.
State must be remote and locked. A state file on one engineer’s laptop means nobody else can safely make changes. Two people applying at once without locking can corrupt it. We store state in a remote backend with locking enabled from the first commit.
State contains secrets. HashiCorp’s own documentation on sensitive data in state is clear that values such as database passwords can be stored in state. Marking a variable as sensitive hides it from command output, not from the state file. So state is encrypted at rest, access to it is restricted like access to production, and secrets come from a secrets manager wherever possible.
State is split by blast radius. One giant state file for the whole company means every change plans against everything, runs slowly, and a single mistake can reach every system. Separate state for networking, data, and each application keeps changes small and failures contained.
Most companies don’t start with Terraform. They start with a cloud console and an engineer who knew where everything was. The question isn’t whether to rebuild it, but how to adopt it safely.
Terraform’s import blocks let existing resources be declared in configuration and adopted into state, and Terraform can generate starting configuration for them. The resources aren’t recreated; Terraform simply starts managing what’s already there.
Development, staging and production should be built from the same code. If they aren’t, staging stops predicting what production will do.
Modules hold the shared definition: a network, a database, a service. Environment configurations call those modules with different inputs: smaller instances in development, multiple zones in production.
Two rules we hold to:
Separate state per environment. A plan in development should never be able to touch production. Separate state, and ideally separate cloud accounts or projects, makes that impossible rather than unlikely.
Pin versions. Terraform, providers and modules are pinned to specific versions and upgraded deliberately. An unpinned provider that changes behavior between Monday’s plan and Tuesday’s apply is a real way to break production.
Every change runs terraform plan in the pull request, the plan is reviewed alongside the code, and applies run from a pipeline rather than a laptop. Policy checks can block changes that open a database to the internet or remove encryption before a human ever reviews them.
Three names come up in every Terraform conversation now, and they’re worth separating.
Terraform is HashiCorp’s tool. In August 2023 HashiCorp moved new Terraform releases from the open-source Mozilla Public License to the Business Source License, and in February 2025 IBM completed its acquisition of HashiCorp. For most companies using Terraform to manage their own infrastructure, the license change has little practical effect, but legal teams sometimes ask, and the answer should be checked against your situation.
OpenTofu is an open-source fork of Terraform created in response to the license change, maintained under the Linux Foundation. It’s largely compatible with Terraform configuration, though the two have diverged since the fork.
HCP Terraform, formerly Terraform Cloud, is HashiCorp’s hosted service for running Terraform: remote state, team permissions, policy enforcement, drift detection and a private module registry. Terraform Enterprise is the self-hosted version. Larger organizations also connect it to service catalogs such as ServiceNow, so teams can request standard infrastructure without writing Terraform themselves.
Our position: the configuration skills are the same across all three. We’ll recommend one based on your licensing view, team size, and whether you want to run the platform yourself or pay someone to.
The useful part of any technology page, and the part most leave out.
Your infrastructure is a handful of resources that rarely change. A single small app on a managed platform may not need infrastructure as code yet. The overhead is real.
You’re all-in on one cloud and want its native tool. AWS CloudFormation and CDK, Azure Bicep and similar tools integrate tightly with their own platform. If you’ll never use another, they’re reasonable choices.
Your team prefers writing infrastructure in a general-purpose language. Pulumi and the CDKs let engineers use TypeScript or Python instead of HCL.
You want Terraform to configure what runs inside servers. Terraform provisions infrastructure; installing and configuring software inside machines is better handled by container images or configuration management tools.
What a Terraform engagement looks like day to day.
The engineers on your kickoff call write the modules and review the plans. No handover to a delivery pool after signature.
A fixed daily overlap window agreed before the engagement starts. Plan reviews and production applies sit inside it; everything else runs asynchronously with written updates.
Nothing reaches your cloud accounts without a plan that a person has read. That’s the whole point of infrastructure as code, and the first thing to erode under deadline pressure.
TERRAFORM
Four things worth knowing before you shortlist a Terraform partner.
Existing infrastructure adopted into Terraform in layers, without downtime or recreating what works.
Remote, locked, encrypted and access-controlled, because it can hold your secrets.
State split by system and environment, so one mistake can’t reach everything.
Modules, state and cloud accounts in your name. Nothing depends on us staying.
For most companies managing their own infrastructure, either works, and the configuration skills transfer. Terraform has moved to the Business Source License and is now part of IBM; OpenTofu is the open-source fork maintained under the Linux Foundation. Choose based on your organization’s view of licensing and whether you want HashiCorp’s commercial platform. Check the licensing question with your own legal team if it matters to you.
In a remote backend with locking enabled, never on a laptop or in a Git repository. State can contain secrets such as database passwords in plain text, so it should be encrypted at rest and access to it restricted as tightly as access to production. Splitting state by system and environment also keeps each plan small and limits what a single mistake can affect.
Yes, without rebuilding them. Terraform’s import blocks adopt existing resources into state, and Terraform can generate starting configuration for them. We import in layers, starting with networking and IAM, and run a plan after each step. Any change the plan proposes is either a code error or undocumented drift, and both are worth finding before Terraform takes over.
Shared modules define each component once, and each environment calls them with its own inputs. Each environment gets its own state, ideally its own cloud account or project, so a plan in development can’t touch production. Terraform, provider and module versions are pinned and upgraded deliberately, so the same code behaves the same way everywhere.
A CI pipeline with a remote backend, locking and plan review covers what many teams need. HCP Terraform or Terraform Enterprise add team permissions, policy enforcement, drift detection, a private module registry and an audit trail without you building them. The tipping point is usually several teams sharing infrastructure, or compliance requirements that need policy enforced centrally.
Yes. When an internal platform or third-party service has no official provider, a custom one lets it be managed in the same Terraform workflow as everything else. We build providers with HashiCorp’s Terraform Plugin Framework, with acceptance tests against the real API, so the provider behaves predictably on create, update, import and delete.
Drift happens when someone changes a resource outside Terraform, usually in the cloud console during an incident. We reduce console write access once Terraform owns a resource, run scheduled plans to detect differences, and treat every detected difference as either a change to codify or a change to revert. Drift that’s ignored becomes the next outage’s surprise.
Tell us what your infrastructure looks like today and we’ll tell you how we’d bring it under code scope, timeline and estimate, at no cost.