> 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/blast-radius-agent.md).

# IaCM Blast Radius Agent

Use the IaCM Blast Radius Agent step to score the risk of a Terraform or OpenTofu plan and explore a visual resource dependency graph before you apply.

Infrastructure changes can carry risk beyond the resources you directly modify. A single misconfigured resource can affect dozens of dependent services. The IaCM Blast Radius Agent is a native Harness pipeline step that runs immediately after a Terraform or OpenTofu plan to analyze the scope and potential risk of those changes before you apply them. It combines resource dependency analysis with LLM-powered reasoning to assign a risk score from 1–10, identify the main risk drivers, and summarize what could be affected. The execution Resources tab also provides an interactive dependency graph that shows how changes propagate across your infrastructure.

The AI Blast Radius Agent step is currently available only for Terraform and OpenTofu provisioners.

***

## What you will learn from this topic <a href="#what-you-will-learn-from-this-topic" id="what-you-will-learn-from-this-topic"></a>

* **Risk analysis**: How the AI Blast Radius Agent scores the risk of a planned change and generates a plain-language explanation of the main risk drivers.
* **Resource dependency graph**: How to use the Graph View to identify resources directly or indirectly affected by a planned change.
* **Pipeline setup**: How to add and configure the AI Blast Radius Agent step in an IaCM pipeline.
* **Output variables**: How to reference the risk score in downstream steps to gate apply or approval workflows.

***

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

Before you use this guide, ensure you have the following:

* **Harness account with IaCM enabled**: You need Infrastructure as Code Management under Infrastructure in Harness when it is entitled on your account. Go to [Getting started with Harness Platform](https://developer.harness.io/harness-platform/new-to-harness-platform/get-started) to access or create a Harness account.

{% hint style="info" %}
If IaCM does not appear, contact your account administrator or [Harness Support](mailto:support@harness.io).
{% endhint %}

* **Pipeline permissions**: You need **View**, **Create/Edit**, and **Execute** for [Pipelines](https://developer.harness.io/harness-platform/use-harness-platform/platform-access-control/permissions-reference#pipelines). To get these, an administrator must assign you a role that includes them. Go to [RBAC in Harness](https://developer.harness.io/harness-platform/use-harness-platform/platform-access-control) and [Manage roles](https://developer.harness.io/harness-platform/use-harness-platform/platform-access-control/add-manage-roles) to configure access.
* **Plan step**: Your IaCM stage must include a Terraform or OpenTofu plan step. Go to [Provision workspace](https://developer.harness.io/infrastructure-as-code-management/platform/workspaces/provision-workspace.md) to create a pipeline that includes one.

***

## Add the AI Blast Radius Agent step <a href="#add-the-ai-blast-radius-agent-step" id="add-the-ai-blast-radius-agent-step"></a>

Complete the following steps to add the AI Blast Radius Agent step in your pipeline:

1. In Harness, navigate to the IaCM module and select the **Pipelines** tab.
2. Open an existing pipeline that runs the plan command for your Terraform or OpenTofu code. Alternatively, click **Create a Pipeline** to start with a fresh pipeline. Go to [Provision Workspaces](https://developer.harness.io/infrastructure-as-code-management/platform/workspaces/provision-workspace.md) to review the steps to create a new pipeline.
3. Click the **Execution** tab.

{% hint style="warning" %}
A Terraform or OpenTofu plan step must exist earlier in the same IaCM stage. If no plan file is present when the AI Blast Radius Agent step runs, the step fails with a clear error. Do not add this step to a stage that does not include a plan step.
{% endhint %}

4. Hover after the plan step in the stage, then click **Add Step**.
5. From the **Step Library**, under the **IaCM** section, select **IaCM Blast Radius Agent**.
6. Configure the step in the panel that opens.

   <figure><img src="https://3575326923-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ffhx6XzjvtJmfv5gPWZ5m%2Fuploads%2Fgit-blob-c76b9d62ac362841c9c1b96f15136d16922ebfb7%2Fblast-radius-step-config.png?alt=media" alt="IaCM Blast Radius Agent step configuration panel showing Name, Timeout, and LLM Connector fields"><figcaption><p>Click to view full size</p></figcaption></figure>

   *Configure the step name, timeout, and optional LLM connector before clicking Apply Changes.*

   * **Name**: Enter a name for the step. Harness generates a step ID from the name using the format `IACMBlastRadiusAgent_N`. Note the generated ID; you will need it if you reference the output variables in downstream steps.
   * **Timeout**: Enter the maximum duration for the step. The default is `10m`. For plans with a large number of resources, increase this value to allow sufficient time for the AI analysis to complete.
   * **LLM Connector (optional)**: Select an LLM connector to route risk analysis through your own AI model instead of the Harness built-in model. Go to [Connect with AI](https://developer.harness.io/harness-ai/use-harness-ai/connect-with-ai) to create an LLM connector.
7. Click **Apply Changes**.
8. Click **Save**, then click **Run** to trigger your pipeline. After the run completes, open the execution from the pipeline detail page and select the **Resources** tab to view the analysis.

***

## Review analysis results <a href="#review-analysis-results" id="review-analysis-results"></a>

After the pipeline runs, navigate to the execution and select the **Resources** tab. If blast radius data exists for the execution, the tab displays the AI Blast Radius Analysis banner, the change summary counters, and the resource table.

<figure><img src="https://3575326923-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ffhx6XzjvtJmfv5gPWZ5m%2Fuploads%2Fgit-blob-dc065956190b24e0f9228de300fa79971aaf1e8d%2Fblast-radius-table-view.png?alt=media" alt="Resources tab in Table View showing the AI Blast Radius Analysis banner with a 10/10 High Risk score, change summary counters, and the paginated resource table"><figcaption><p>Click to view full size</p></figcaption></figure>

### AI Blast Radius Analysis banner <a href="#ai-blast-radius-analysis-banner" id="ai-blast-radius-analysis-banner"></a>

The banner shows the overall plan risk score on a 1–10 scale, a colored risk level badge, and a plain-language summary of the main risk drivers. The score is a plan-level aggregate. It reflects the combined risk of all planned changes, not the highest individual resource score.

Risk level badges map to score ranges as follows:

| Label  | Score range |
| ------ | ----------- |
| Low    | 1–3         |
| Medium | 4–6         |
| High   | 7–10        |

### Change summary counters <a href="#change-summary-counters" id="change-summary-counters"></a>

Below the banner, a row of counters shows the number of resources in each planned change category: **To be Deleted**, **To be Added**, **To be Changed**, **To be Replaced**, **Unchanged**, **To be Removed**, and **To be Imported**.

### Table View and Graph View <a href="#table-view-and-graph-view" id="table-view-and-graph-view"></a>

Use the **Table View** and **Graph View** toggle in the upper-right corner of the Resources tab to switch between views.

* **Table View**: Lists all planned changes with Provider, Type, Name, and Module columns. The table paginates at 25 resources per page.
* **Graph View**: Renders an interactive dependency graph of changed resources and their relationships.

If no blast radius data exists for the execution, the Resources tab displays exactly as it does without the feature. No extra banners or counters appear.

***

## Use Graph View <a href="#use-graph-view" id="use-graph-view"></a>

Graph View renders your planned changes and their dependencies as an interactive node graph. Use it to identify which resources are directly or indirectly affected by a planned change before you apply.

<figure><img src="https://3575326923-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ffhx6XzjvtJmfv5gPWZ5m%2Fuploads%2Fgit-blob-40319885b6a1f957ac737adc496134c3f533f589%2Fblast-radius-graph-view.png?alt=media" alt="Graph View showing the left resource panel with risk-sorted resources, the central dependency graph with node details, and the right filter panel"><figcaption><p>Click to view full size</p></figcaption></figure>

The Graph View has three areas:

* **Left resource panel**: Lists all resources sorted by individual risk score. Each entry shows the change type, resource name, full module path, and a risk badge with score and level. Use the search bar at the top to find a specific resource, or select the filter icon to narrow the list. The **Deployment risk score** badge at the top of the panel shows the overall plan score.
* **Central graph canvas**: Renders resources as nodes with edges representing dependency relationships. Each node shows the change type label, resource name, resource type, full module path, and individual risk score badge. Select a node to highlight its dependency chain.
* **Right filter panel**: Controls which resources and relationships the graph displays. Three dropdowns are available:
  * **Resource state**: Filter the graph by change type. Select one or more of Added, Changed, Deleted, Unchanged, Removed, Imported, or Replaced. Select **Clear Selection** to reset.
  * **Relations**: Set the dependency depth to **Level 1**, **Level 2**, or **Level 3**. Level 1 shows only direct dependencies; Level 3 expands to three hops from the selected resource.
  * **Dependencies**: Set the direction to **Upstream**, **Downstream**, or **Upstream and Downstream**.

Use the zoom controls in the lower-left corner of the canvas to zoom in and out, or select the fit-to-screen icon to reset the view.

### Large-graph view <a href="#large-graph-view" id="large-graph-view"></a>

When a plan contains a large number of resources, the graph expands to show the full dependency tree across all resources.

<figure><img src="https://3575326923-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ffhx6XzjvtJmfv5gPWZ5m%2Fuploads%2Fgit-blob-07cf2acb67980f3d2d6191dc2aebb0c2d563630a%2Fblast-radius-graph-view-large.png?alt=media" alt="Graph View with a large plan showing the full resource dependency tree across hundreds of nodes"><figcaption><p>Click to view full size</p></figcaption></figure>

Use the right filter panel to reduce the visible set when the full graph is dense. Filtering by **Resource state** or reducing the **Relations** depth to Level 1 limits the graph to the most relevant nodes.

***

## Control downstream steps with output variables <a href="#control-downstream-steps-with-output-variables" id="control-downstream-steps-with-output-variables"></a>

The AI Blast Radius Agent step exposes the following output variables that you can reference in downstream steps:

| Variable     | Type   | Description                                 |
| ------------ | ------ | ------------------------------------------- |
| `RISK_SCORE` | Number | Numeric risk score on a 1–10 scale          |
| `RISK_LEVEL` | String | Text risk level: `Low`, `Medium`, or `High` |

Use these variables to control downstream steps based on the risk score. For example, add an [IaCM Approval step](https://developer.harness.io/infrastructure-as-code-management/platform/iacm-pipelines/operations-overview.md) after the AI Blast Radius Agent step and set a conditional execution expression on the approval step so that it only activates when the risk score meets your threshold. Go to [Conditional execution](https://developer.harness.io/harness-platform/use-harness-platform/pipelines/step-skip-condition-settings) to configure the expression on the downstream step.

The following example expression checks the risk score from the first Blast Radius Agent step in the stage:

```
<+execution.steps.IACMBlastRadiusAgent_1.output.outputVariables.RISK_SCORE>
```

Adjust the step ID (`IACMBlastRadiusAgent_1`) to match the **Id** shown in your step configuration panel.

Go to [Output variables](https://developer.harness.io/infrastructure-as-code-management/platform/reports-and-insights/output-variables.md) to learn how to reference step output variables in pipeline expressions.

***

## Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>IaCM Blast Radius Agent step fails with a missing plan file error</summary>

The AI Blast Radius Agent step requires a Terraform or OpenTofu plan step to exist earlier in the same IaCM stage. Add a plan step before the AI Blast Radius Agent step and re-run the pipeline.

</details>

<details>

<summary>AI Blast Radius Analysis banner does not appear on the Resources tab after the Blast Radius Agent step completes successfully</summary>

Confirm that the AI Blast Radius Agent step completed without errors, then refresh the pipeline execution page. If the banner still does not appear, contact Harness Support.

</details>

<details>

<summary>IaCM Blast Radius Agent step times out on a plan with a large number of resources</summary>

Increase the step timeout in the step configuration panel. For large plans, set the timeout to at least 20m. If the step continues to time out, contact Harness Support to review resource limits for your account.

</details>

<details>

<summary>LLM Connector is not available or returns an error in the IaCM Blast Radius Agent step</summary>

Verify that the LLM connector is correctly configured and that the credentials are valid. Go to [Connect with AI](https://developer.harness.io/harness-ai/use-harness-ai/ide-and-integrations/mcp-server) in the Harness Platform docs to review connector requirements. If you remove the connector selection, the step falls back to the Harness built-in model.

</details>

***

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

Use the AI Blast Radius Agent step to understand deployment risk before you apply, then combine it with the following features to build a complete review and approval workflow:

* Go to [Pipeline operations overview](https://developer.harness.io/infrastructure-as-code-management/platform/iacm-pipelines/operations-overview.md) to add an approval gate, drift detection, or queue step to your pipeline.
* Go to [Output variables](https://developer.harness.io/infrastructure-as-code-management/platform/reports-and-insights/output-variables.md) to reference the risk score in downstream pipeline expressions.
* Go to [Connect with AI](https://developer.harness.io/harness-ai/use-harness-ai/connect-with-ai) to bring your own LLM for risk analysis.

{% @harness-feedback/feedback %}
