Terraform Cloud Run Tasks

Terraform Cloud Overview

Terraform Cloud (TFC) is a SaaS paid platform provided by HashiCorp that provides production-ready state management with continuous delivery for its users. Teams managing their cloud infrastructure with Terraform benefit from:

  • Terraform Cloud remote state out-of-the-box management with built-in versioning

  • A centralized location for the team to collaborate on infrastructure, in order to review and approve changes.

Last year at HashiConf Europe, HashiCorp previewed a new feature called run tasks for HashiCorp Terraform Cloud. The run tasks feature enables organizations to integrate third-party tools within a Terraform run, specifically between the plan and apply stages of the Terraform Cloud workflow.

In April 2022, Firefly created the capability to scan the Terraform cloud footprint and automatically codify unmanaged and drifted assets. In addition, Firefly used the run task integration to anticipate how changes in the Terraform plan affect other assets in the environment, regardless of whether those assets are managed by Terraform.

If you are a Terraform Cloud user, sign up with Firefly to integrate and connect your workspaces in Terraform Cloud. Anticipating changes before deployment avoids costly mistakes in your software development lifecycle with Terraform Cloud.

Note: This feature is only available for HashiCorp Business tier users.

Integrating Terraform Cloud with Firefly

Before you begin

You must be the administrator of your Firefly account to configure the Terraform Cloud integration.


  1. Copy the token.

  2. In Firefly, select Settings > Integrations.

  3. Select Add New > Terraform Cloud.

  4. Enter a descriptive name in the Nickname field.

  5. Paste the token in the API token field.

  6. Select Next.

  7. Copy the Endpoint URL and HMAC key created by Firefly.

  8. Select Create a run task from the Terraform console.

  9. From the Workspaces tab, select Settings > Run Tasks. The newly created run task appears in the Run Task window.

  10. Select the add icon to add the run task to your workspace.

  11. Select the Enforcement Level of the run task. (Only the Advisory level is supported by Firefly):

    1. Advisory (Informs the user of a failure without interrupting the run).

    2. Mandatory (The run is terminated, and applied when the failure is resolved).

  12. To start a new run, select Actions > Start new run.

Viewing integration results

  • After the run tasks is completed, you can view the results and the number of assets affected by Firefly integration in Tasks Passed.

  • Select Details to go to Firefly’s Inventory table, which displays asset configuration and IaC status.

Last updated