> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/infrastructure-as-code-management/3.0/new-to-iacm/overview.md).

# Harness Infrastructure as Code Management (IaCM) Overview

This guide provides an overview of Harness Infrastructure as Code Management (IaCM) and introduces key concepts to help you manage your infrastructure efficiently and effectively.

### Overview <a href="#overview" id="overview"></a>

As organizations scale, Infrastructure as Code (IaC) becomes crucial for efficient, consistent, and secure infrastructure management. By allowing teams to define, deploy, and manage infrastructure using code, IaC ensures repeatability, reduces errors, and enhances collaboration.

Harness IaCM connects your infrastructure code in your repository with the resources you provision in your cloud accounts, using isolated **workspaces**, repeatable **pipelines**, and shared **connectors**. It streamlines and secures IaC with policy, drift detection, cost insight, and auditing so teams can scale while keeping control and visibility.

#### Supported provisioners <a href="#supported-provisioners" id="supported-provisioners"></a>

Harness IaCM supports the following **provisioners** and related automation:

* **OpenTofu:** Open-source infrastructure as code, compatible with the Terraform ecosystem. Go to [OpenTofu](https://opentofu.org/) to review the project, and go to [What's supported in IaCM](/infrastructure-as-code-management/3.0/troubleshooting-and-resources/whats-supported.md) for version support.
* **Terraform:** MPL-licensed Terraform up to **v1.5.x**. BSL-licensed releases (**v1.6.0** and later) are not supported; use [OpenTofu](https://opentofu.org/docs/intro/migration/) as a drop-in alternative where applicable. Go to [What's supported in IaCM](/infrastructure-as-code-management/3.0/troubleshooting-and-resources/whats-supported.md) for version support.
* **Terragrunt:** Thin wrapper that orchestrates OpenTofu/Terraform modules and shared configuration across environments. Go to [Terragrunt](https://terragrunt.gruntwork.io/) to review the project, and go to the Terragrunt path in [Get started with IaCM](/infrastructure-as-code-management/3.0/new-to-iacm/get-started.md#terragrunt) to set one up.
* **Ansible (configuration management):** Define inventories and playbooks for configuration and automation on target hosts (for example over SSH or WinRM), alongside your core IaC workflows. Go to [Ansible in IaCM](/infrastructure-as-code-management/3.0/use-iacm/configuration-management.md) to review the concepts.

#### Key features <a href="#key-features" id="key-features"></a>

Harness IaCM includes the following key features:

* **Policy enforcement:** Define and enforce policies at configuration time to prevent unauthorized changes and restrict modifications to critical resources. Go to [Policy enforcement](/infrastructure-as-code-management/3.0/platform/policy-and-governance/opa-workspace.md) to review the details.
* **Drift detection:** Harness IaCM continuously monitors your infrastructure, alerting you to discrepancies between declared state and what is actually provisioned. Go to [Drift detection](/infrastructure-as-code-management/3.0/platform/iacm-pipelines/operations-overview.md) to review the details.
* **Pull request (PR) automation:** Manage PRs within Harness with visual comparisons and cost estimates for proposed changes. Go to [PR automation](/infrastructure-as-code-management/3.0/platform/iacm-pipelines/operations-overview.md) to review the details.
* **Advanced pipeline capabilities:** Customize pipelines with security checks, parallel stages, and other patterns. Go to [Pipeline capabilities](/infrastructure-as-code-management/3.0/platform/iacm-pipelines/operations-overview.md) to review the details.
* **State management and auditing:** Manage state with controlled access and history tied to provisioned workspaces. Go to [Provision a workspace](/infrastructure-as-code-management/3.0/platform/workspaces/provision-workspace.md) to review state management and workspace provisioning.
* **Cost management:** Estimate the cost of proposed changes before you apply them. Go to [Cost estimation](/infrastructure-as-code-management/3.0/platform/workspaces/cost-estimation.md) to review the details.

Go to the [IaCM overview video](https://youtu.be/IzLP270Daqo?si=U-JC0YbLskXevajC) for a more detailed demo.

### How it fits together <a href="#how-it-fits-together" id="how-it-fits-together"></a>

A typical IaCM journey looks like this:

1. **Connectors:** Configure **Git** (or Harness Code Repository) and **cloud provider** connectors so Harness can reach your code and your accounts. [Connectors and variables](/infrastructure-as-code-management/3.0/platform/iacm-connectors-variables/connectors-variables.md) applies to how workspaces and pipelines use these resources; platform-wide connector setup is covered under [Code repositories](/harness-ai/use-harness-platform/connectors/code-repositories/connect-to-code-repo.md) and [Cloud providers](/harness-ai/use-harness-platform/connectors/cloud-providers.md).
2. **Workspace:** Create a **workspace** that points at your repository path, provisioner type (OpenTofu, Terraform, Terragrunt, and related settings), backend/state expectations, and the connectors the workspace should use.
3. **Provision pipeline:** Run a pipeline that executes **init**, **plan**, and **apply** (for example via the Terraform/OpenTofu plugin steps). [Provision a workspace](/infrastructure-as-code-management/3.0/platform/workspaces/provision-workspace.md) and [Tofu/Terraform plugins](/infrastructure-as-code-management/3.0/use-iacm/iacm-cli-commands/terraform-plugins.md) describe the commands and flow.
4. **Optional approval:** Add an **approval** step between **plan** and **apply** so reviewers can confirm changes (and cost estimates, if enabled) before infrastructure is updated.

For **Terragrunt** workspaces, you can set a default **Folder Path** on the workspace and optionally set **Folder Path Override** per run on each Terragrunt pipeline step, such as **init**, **plan**, and **apply**. This is useful for monorepos and per-environment paths without separate workspaces. Details appear in the Terragrunt content under [Get started with IaCM](/infrastructure-as-code-management/3.0/new-to-iacm/get-started.md#terragrunt).

#### Resource hierarchy <a href="#resource-hierarchy" id="resource-hierarchy"></a>

Harness IaCM organizes resources in a nested hierarchy. Understanding this structure helps you decide where to create workspaces and how to scope access:

* **Account** is the root level, containing multiple organizations.
* **Organizations** contain multiple projects.
* **Projects** contain multiple workspaces.
* **Workspaces** are isolated environments for IaC execution within a project.
* **Pipelines** are independent entities that you can execute against any workspace within a project.

![IaCM workflow hierarchy](/files/KZUaPJny3Rs8iCmJ9tXk)

### Key concepts <a href="#key-concepts" id="key-concepts"></a>

Infrastructure as Code (IaC) is the ability to define cloud resources as code, allowing for repeatable infrastructure configuration. Examples of IaC tools include HashiCorp Terraform and Amazon CloudFormation.

#### Workspace <a href="#workspace" id="workspace"></a>

Your workspace is a container for your infrastructure resources: IaC code, **variables**, **connectors** (code repository and cloud provider), **state**, and **pipelines**. [Get started with IaCM](/infrastructure-as-code-management/3.0/new-to-iacm/get-started.md) walks through creating a workspace and linking connectors.

#### Operations <a href="#operations" id="operations"></a>

Operations are actions taken to manage and maintain your infrastructure using IaC tools.

* **Provision:** Applying infrastructure configuration to create or update cloud resources. Provision flows usually follow **init → plan → apply** in a pipeline. Go to [Provision a workspace](/infrastructure-as-code-management/3.0/platform/workspaces/provision-workspace.md) to review the flow.
* **Destroy:** Removing resources managed by the workspace’s IaC. Go to [Destroy workspaces](/infrastructure-as-code-management/3.0/platform/workspaces/destroy-workspaces.md) to review destroy workflows.
* **Drift detection:** Occurs when actual infrastructure diverges from the state defined by your IaC. Go to [Drift detection](/infrastructure-as-code-management/3.0/platform/iacm-pipelines/operations-overview.md) to review the details.

#### Resources <a href="#resources" id="resources"></a>

Resources are components and services managed by your IaC tool and cloud provider.

* **Cloud resource:** Any instance of cloud infrastructure that is currently running.
* **Cloud provider:** A platform offering cloud computing services that you connect with a **connector**.
* **Harness state tracking:** Tracks the current state of a stack and changes over time within a workspace.
* **Terraform/OpenTofu state backend:** Where state is stored and locked for shared use. [Remote backends](/infrastructure-as-code-management/3.0/use-iacm/remote-backends/use-backends.md) covers backend options and Harness-managed state.
* **Variables:** Values that parameterize IaC and pipeline behavior. Go to [Connectors and variables](/infrastructure-as-code-management/3.0/platform/iacm-connectors-variables/connectors-variables.md) to review variables in IaCM.

### FAQs <a href="#faqs" id="faqs"></a>

<details>

<summary>What is the difference between OpenTofu and Terraform support in Harness IaCM?</summary>

Harness IaCM supports MPL-licensed Terraform up to v1.5.x. BSL-licensed Terraform releases (v1.6.0 and later) are not supported; use OpenTofu as a drop-in alternative where applicable.

</details>

<details>

<summary>How are Harness IaCM resources organized?</summary>

Resources are organized in a nested hierarchy: Account contains multiple Organizations, Organizations contain multiple Projects, Projects contain multiple Workspaces, and Pipelines are independent entities you can execute against any workspace in a project.

</details>

Go to [Get started with IaCM](/infrastructure-as-code-management/3.0/new-to-iacm/get-started.md) to begin hands-on setup or continue your IaCM journey.
