A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks below:

HCP Terraform run tasks | Terraform

HCP Terraform run tasks let you directly integrate third-party tools and services at certain stages in the HCP Terraform run lifecycle. Use run tasks to validate Terraform configuration files, analyze execution plans before applying them, scan for security vulnerabilities, or perform other custom actions.

Run tasks send data about a run to an external service at specific run stages. The external service processes the data, evaluates whether the run passes or fails, and sends a response to HCP Terraform. HCP Terraform then uses this response and the run task enforcement level to determine if a run can proceed. Explore run tasks in the Terraform registry.

Note: HCP Terraform Free edition includes one run task integration that you can apply to up to ten workspaces. Refer to HCP Terraform pricing for details.

You can manage run tasks through the HCP Terraform UI or the Run Tasks API.

Hands-on: Try the HCP Packer validation run task tutorial.

Terraform Version - You can assign run tasks to workspaces that use a Terraform version of 1.1.9 and later. You can downgrade a workspace with existing runs to use a prior Terraform version without causing an error. However, HCP Terraform no longer triggers the run tasks during plan and apply operations.

Permissions - To create a run task, you must have a user account with the Manage Run Tasks permission. To associate run tasks with a workspace, you need the Manage Workspace Run Tasks permission on that particular workspace.

Explore the full list of run tasks in the Terraform Registry.

Run tasks send an API payload to an external service. The API payload contains run-related information, including a callback URL, which the service uses to return a pass or fail status to HCP Terraform.

For example, the HCP Packer integration checks image artifacts within a Terraform configuration for validity. If the configuration references images marked as unusable (revoked), then the run task fails and provides an error message.

To create a new run task:

  1. Sign in to HCP Terraform or Terraform Enterprise and navigate to the workspace where you want to create a run task.

  2. Navigate to Organization Settings and select Run Tasks.

  3. Click Create a new run task. The Run Tasks page appears.

  4. Enter the information about the run task to be configured:

  5. Select a Source:

  6. Click Create run task. The run task is now available within the organization, and you can associate it with one or more workspaces.

Global Run Tasks

When you create a new run task, you can choose to apply it globally to every workspace in an organization. Your organization must have the global-run-task entitlement to use global run tasks.

  1. Select the Global checkbox

  2. Choose when HCP Terraform should start the run task:

  3. Choose an enforcement level:

  1. Sign in to HCP Terraform or Terraform Enterprise, and choose Workspaces from the sidebar.

  2. Select the workspace that you want to associate with a run task.

  3. Open the Settings menu and select Run Tasks.

  4. Click the + next to the task you want to add to the workspace.

  5. Choose when HCP Terraform should start the run task:

  6. Choose an enforcement level:

  7. Click Create. Your run task is now configured.

Run tasks perform actions before and after, the plan and apply stages of a Terraform run. Once all run tasks complete, the run ends based on the most restrictive enforcement level in each associated run task.

For example, if a mandatory task fails and an advisory task succeeds, the run fails. If an advisory task fails, but a mandatory task succeeds, the run succeeds and proceeds to the apply stage. Regardless of the exit status of a task, HCP Terraform displays the status and any related message data in the UI.

Removing a run task from a workspace does not delete it from the organization. To remove a run task from a specific workspace:

  1. Sign in to HCP Terraform or Terraform Enterprise and navigate to the workspace where you want to remove a run task.

  2. Choose Settings from the sidebar, then Run Tasks.

  3. Click the ellipses (...) on the associated run task, and then click Remove. The run task will no longer be applied to runs within the workspace.

You must remove a run task from all associated workspaces before you can delete it. To delete a run task:

  1. Sign in to HCP Terraform or Terraform Enterprise and navigate to the workspace associated with a run task you want to delete.

  2. Choose Settings from the sidebar, then Run Tasks.

  3. Click the ellipses (...) next to the run task you want to delete, and then click Edit.

  4. Click Delete run task.

You cannot delete run tasks that are still associated with a workspace. If you attempt this, you will see a warning in the UI containing a list of all workspaces that are associated with the run task.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4