Internative Logo

What Is Terraform? Infrastructure as Code Across Every Cloud

What Is Terraform? Infrastructure as Code Across Every Cloud

Most cloud environments start with someone clicking through a console. By the time there are three environments, a dozen services and several people with admin rights, nobody can say for certain what is running, why a setting is the way it is, or how to rebuild it after a mistake. Terraform replaces those clicks with code: you describe the infrastructure you want in files, review changes like any other code change, and let the tool make reality match the files.

This article explains what Terraform is, how its plan-and-apply model works, where it fits, what changed with its licence and ownership, and how it compares with OpenTofu, Pulumi and the cloud providers' own tools.

What is Terraform?

Terraform is an infrastructure as code (IaC) tool developed by HashiCorp. You write configuration files that declare resources, such as virtual machines, networks, databases, DNS records, Kubernetes clusters or SaaS settings, and Terraform creates, updates or deletes them through each platform's API until the real infrastructure matches the configuration.

HashiCorp, the company founded by Mitchell Hashimoto and Armon Dadgar, released Terraform 0.1 on 28 July 2014. That first version supported only two platforms, AWS and DigitalOcean. Support for other providers grew quickly through the community, and Terraform 1.0, the first release with long-term compatibility guarantees, became generally available on 8 June 2021.

Two later events changed the context around the tool. On 10 August 2023, HashiCorp moved future releases of its products, Terraform included, from the open-source Mozilla Public License 2.0 to the Business Source License (BSL) 1.1. Using Terraform to manage your own infrastructure remains permitted; what the licence restricts is building a product that competes with HashiCorp. In response, a group of companies forked the last MPL-licensed version as OpenTofu, which the Linux Foundation accepted on 20 September 2023 and which joined the Cloud Native Computing Foundation as a sandbox project in April 2025. Separately, IBM announced its acquisition of HashiCorp in April 2024 and completed it on 27 February 2025; HashiCorp now operates as a division of IBM Software.

How Terraform works

Declarative configuration. Configuration is written in HashiCorp Configuration Language (HCL), a readable format designed for this job. You describe the end state, for example "two application servers behind a load balancer, in this network", rather than the steps to get there. Terraform works out the order of operations from the dependencies between resources.

Providers. Terraform itself knows nothing about AWS or Azure. Providers are plugins that translate resources into API calls for one platform: the major clouds, Kubernetes, and services such as Cloudflare, GitHub and Datadog, all published in the public Terraform Registry.

State. Terraform keeps a state file that maps each resource in the configuration to the real object it created. State is how Terraform knows what already exists and what to change. In a team it lives in a remote backend, such as an object storage bucket or HCP Terraform, with locking so two people cannot apply changes at the same time.

Plan, then apply. The core workflow has three commands. terraform init downloads the providers, terraform plan compares the configuration with the state and the real infrastructure and shows exactly what will be created, changed or destroyed, and terraform apply carries out that plan. Reviewing the plan in a pull request before applying it is what makes infrastructure changes auditable.

Modules. A module is a reusable package of configuration, such as "a database with backups and alerts", that gives every environment the same structure.

Key features

  • Multi-cloud with one workflow: the same language and commands manage AWS, Azure, Google Cloud and other platforms.
  • Execution plans that show every change before it happens, which makes reviews and approvals possible.
  • Drift detection: running a plan reveals settings that were changed by hand outside Terraform.
  • Modules and the public registry for reusable building blocks.
  • Import to bring existing, hand-built resources under Terraform's management.
  • HCP Terraform and Terraform Enterprise (HashiCorp's managed and self-hosted platforms) for remote runs, policy checks and access control.

Where Terraform is used

  • Cloud foundations: accounts, networks, identity and access rules that every other system depends on.
  • Repeatable environments: development, test and production built from the same code with different variables.
  • Kubernetes platforms: clusters, node pools and the cloud resources around them, often with Kubernetes workloads deployed by Helm on top.
  • CI/CD pipelines: plans run on every pull request and applies run after approval, in tools such as GitHub Actions or GitLab CI/CD.
  • Disaster recovery: an environment described in code can be recreated in another region.

When to choose Terraform, and when not to

Choose Terraform when:

  • You run on more than one cloud, or expect to, and want one tool and one review process for all of it.
  • Infrastructure changes need an audit trail: who changed what, when, and with whose approval.
  • Several environments have to stay consistent, and hand-made differences between them have caused incidents.
  • Your team prefers a declarative configuration language over writing infrastructure in a general-purpose programming language.

Look elsewhere when:

  • You need to configure what runs inside servers: packages, files, services. That is configuration management, and Ansible is built for it. Many teams use Terraform to create servers and Ansible to configure them.
  • Your developers want loops, classes and tests in a language they already use. Pulumi offers the same model in TypeScript, Python, Go, C# and Java.
  • You work only on one cloud and want the provider's own tooling with day-one support for new services, such as AWS CloudFormation or Azure Bicep.
  • Licence terms are a hard requirement. If your organisation only allows open-source licences, or you are building a product that offers Terraform-like functionality, OpenTofu keeps the MPL 2.0 licence.

The practical difficulties with Terraform are state and scale. A lost or corrupted state file is a serious incident, very large configurations become slow to plan, and refactoring resources without destroying them needs care.

Terraform and its alternatives

ToolApproachLicenceBest fit
TerraformDeclarative HCL, providers, stateBSL 1.1 (source-available)Multi-cloud teams with a review workflow
OpenTofuFork of Terraform, same modelOpen source (MPL 2.0)Teams that need an open-source licence
PulumiGeneral-purpose languagesOpen source (Apache 2.0)Developer-led teams that want real code
AWS CloudFormation / CDKNative AWS templates or codeProprietary serviceAWS-only estates
AnsibleProcedural playbooksOpen source (GPL)Configuring servers and applications

The closest comparison is with OpenTofu. It began as a fork of the last MPL-licensed Terraform version, so existing configurations largely carry over, although the two projects have added different features since. The choice is mostly about licence and governance: a foundation-hosted open-source project, or HashiCorp's product with its commercial platform and support.

Pulumi solves the same problem with a different interface. Instead of HCL, you write infrastructure in TypeScript, Python or another general-purpose language, which helps teams that want abstractions and unit tests, and can be harder to review for teams that want configuration to stay simple. Terraform and Docker are not alternatives: Terraform builds the infrastructure, and containers run on it.

How we use Terraform at Internative

We use Terraform to build infrastructure that is reproducible, auditable and scalable. Describing it in code lets us manage multi-cloud environments with confidence, and it reduces operational risk and the configuration drift that builds up when changes are made by hand. We explain how this fits into delivery pipelines in DevOps and CI/CD: continuous improvement in software development.

If you want your cloud environments defined in code, reviewed before they change and rebuildable when something goes wrong, our DevOps services team can help you set up Terraform and the pipeline around it.

Frequently asked questions

What is Terraform used for?

Terraform is used to create and manage infrastructure through code: cloud networks, servers, databases, Kubernetes clusters, DNS and many SaaS settings. Teams use it to build identical environments, review infrastructure changes before they happen, and rebuild systems after failures.

Is Terraform free?

The Terraform command-line tool is free to download and use, including for managing a company's own production infrastructure. Since August 2023 it is licensed under the Business Source License, which forbids using it to build a competing product. HCP Terraform and Terraform Enterprise, HashiCorp's team platforms, are commercial products with a free tier for the managed service.

Is Terraform still relevant?

Yes. Terraform remains one of the most widely used infrastructure as code tools, and IBM continues to develop it after acquiring HashiCorp. The main change is that teams now choose consciously between Terraform and its open-source fork, OpenTofu.

What is replacing Terraform?

Nothing has replaced it, but there are two common alternatives. OpenTofu is a largely compatible fork for teams that want an open-source licence, and Pulumi is chosen by teams that prefer writing infrastructure in TypeScript, Python or Go. Single-cloud teams sometimes use their provider's native tool instead.

Is Terraform difficult to learn?

The basics are approachable: HCL is easy to read, and a first resource can be created in an afternoon. The harder parts are designing modules, managing state safely across teams, and structuring large estates, and they come with experience rather than syntax.

Related services

Where this topic becomes an engagement.

Keep reading

The articles that follow this one.