Back to glossary

Terraform

Terraform is an open-source infrastructure as code tool created by HashiCorp that lets teams define cloud resources in declarative configuration files, usually written in HashiCorp Configuration Language (HCL), and provision them across many cloud providers.

What is Terraform?

Terraform is a declarative Infrastructure as Code (IaC) tool developed by HashiCorp that enables organizations to provision, configure and manage infrastructure through version-controlled configuration files.

Terraform supports multiple cloud providers, including AWS, Microsoft Azure, Google Cloud and Oracle Cloud Infrastructure (OCI), enabling organizations to automate infrastructure management across multicloud environments.

How Terraform works

Terraform allows engineers to define the desired state of their infrastructure and determines the operations required to achieve it.

A typical Terraform workflow consists of three stages:

  • Terraform Init: Initializes the working directory and downloads the required providers and modules.
  • Terraform Plan: Evaluates the desired infrastructure configuration against the current state and identifies proposed changes.
  • Terraform Apply: Executes the proposed infrastructure changes through provider APIs.

‍

Terraform uses providers to interact with external platforms and maintains a state file to track the relationship between defined and deployed infrastructure resources.

Terraform and cloud security

Terraform enables organizations to integrate security into infrastructure development and deployment workflows through practices such as:

  • Infrastructure as Code scanning
  • Automated security and compliance checks
  • Policy as Code
  • Version control and peer reviews
  • Standardized infrastructure templates
  • Automated deployment approvals

‍

These practices support shift-left security by identifying potential cloud misconfigurations before infrastructure is deployed. However, insecure configurations embedded in reusable Terraform modules or templates can also introduce the same security risks across multiple environments.

Limitations of Terraform-based security

Security controls integrated into Terraform workflows primarily govern infrastructure changes that pass through those workflows.

Cloud changes can also originate from:

  • Cloud management consoles (ClickOps)
  • CLI and PowerShell commands
  • Direct API requests
  • Third-party integrations
  • Automation scripts
  • Autonomous AI agents

‍

These alternative deployment paths may bypass Terraform-based security checks, introduce cloud misconfigurations and create configuration drift.

Why it matters

Terraform is a foundational component of modern cloud infrastructure automation, enabling organizations to improve operational efficiency, consistency and scalability.

Combining IaC security with deployment-stage enforcement helps organizations extend security coverage beyond individual infrastructure workflows.

Ready to take your first proactive step?