> 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/platform/iacm-pipelines/default-pipelines.md).

# Default Pipelines

IaCM Default Pipelines offer a streamlined approach to provisioning, destroying, and managing infrastructure workspaces by allowing you to run your pre-configured pipelines directly from any workspace. These pipelines can be easily created and set as defaults at the project level, providing quick and consistent access across all workspaces. This functionality ensures a seamless experience and maintains uniformity throughout your infrastructure management.

In addition, as some workspaces may require specialized pipelines, you can overwrite the defaults at the workspace level. This will not disrupt any other workspace using the project level defaults.

{% hint style="danger" %}
**DANGER ZONE**

A pipeline containing the `destroy` command will remove all saved infrastructure managed by your Harness workspace.
{% endhint %}

***

### Before you begin <a href="#before-you-begin" id="before-you-begin"></a>

* **IaCM permissions:** View and Create/Edit permissions for IaCM Pipelines, and Edit permissions for Project Settings to configure IaCM Defaults. Go to [RBAC in Harness](/harness-ai/use-harness-platform/platform-access-control.md) to configure roles.
* **Existing pipelines:** At least one pipeline created for each operation you want to set as a default (Plan, Provision, Detect Drift, Destroy). Go to [Pipeline Operations](/infrastructure-as-code-management/platform/iacm-pipelines/operations-overview.md) to add operational features to your pipelines before assigning them as defaults.

{% embed url="<https://www.youtube.com/embed/KvdzUWs8urE>" %}
Harness IaCM: Default Pipelines
{% endembed %}

***

### Configure and run default pipelines <a href="#configure-and-run-default-pipelines" id="configure-and-run-default-pipelines"></a>

{% tabs %}
{% tab title="Interactive Guide" %}
{% embed url="<https://app.tango.us/app/embed/82d2b223-b468-4cdf-a311-be4fdf59ce6c?skipCover=false&defaultListView=false&skipBranding=false&makeViewOnly=false&hideAuthorAndDetails=true>" %}
Harness IaCM: Default Pipelines
{% endembed %}
{% endtab %}

{% tab title="Step-by-Step" %}

#### Set your project-level default pipelines <a href="#set-your-project-level-default-pipelines" id="set-your-project-level-default-pipelines"></a>

1. In your IaCM module, select **Project settings**, then select **IaCM Defaults**.
2. Select the appropriate pipelines for your default categories and frameworks (OpenTofu / Terraform):
   * **Plan:** Pipeline for running the plan only.
   * **Provision:** Pipeline for initializing, planning, approving, and applying changes.
   * **Detect Drift:** Pipeline for detecting drift between your configuration and provider state.
   * **Destroy:** Pipeline for initializing, planning, approving, and destroying infrastructure.

#### Review your default pipelines in your workspace <a href="#review-your-default-pipelines-in-your-workspace" id="review-your-default-pipelines-in-your-workspace"></a>

3. Select **Workspaces**, then select one of your workspaces to run your default pipelines.
4. Select the **Configuration** tab and scroll down to **Default pipelines** to inspect or override your default pipelines at the selected workspace-level (this will not affect your project level settings).

#### Run your default pipelines in your workspace <a href="#run-your-default-pipelines-in-your-workspace" id="run-your-default-pipelines-in-your-workspace"></a>

5. While in your workspace, run your default pipelines against it with the `Plan`, `Provision` and `Check for Drift` buttons.

{% hint style="info" %}
**EXECUTE THE DESTROY PIPELINE**

To prevent accidental execution, the Destroy pipeline is in your workspace’s **Configuration** tab, under **Danger Zone**.

To run it, select **Destroy workspace**.
{% endhint %}
{% endtab %}
{% endtabs %}

Review previously run pipelines by selecting your workspace and reviewing the **Execution History** tab.

***

### Next steps <a href="#next-steps" id="next-steps"></a>

You have configured default pipelines at the project level and can now run Plan, Provision, and Detect Drift operations directly from any workspace.

* Go to [Pipeline Operations](/infrastructure-as-code-management/platform/iacm-pipelines/operations-overview.md) to add approval gates, drift detection, PR automation, and queue steps to your default pipelines.
* Go to [Remove and import resources](/infrastructure-as-code-management/platform/iacm-pipelines/remove-resources.md) to safely remove infrastructure resources from state without destroying them.
* Go to [Custom images](/infrastructure-as-code-management/platform/iacm-pipelines/plugin-images.md) to use your own Terraform or OpenTofu plugin images in your IaCM pipeline stages.
