Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.65 KB

workspace_run_task.html.markdown

File metadata and controls

47 lines (33 loc) · 1.65 KB
layout page_title sidebar_current description
tfe
Terraform Enterprise: tfe_workspace_run_task
docs-resource-tfe_workspace_run_task
Manages Workspace Run tasks.

tfe_workspace_run_task

Run tasks allow Terraform Cloud to interact with external systems at specific points in the Terraform Cloud run lifecycle. Run tasks are reusable configurations that you can attach to any workspace in an organization.

The tfe_workspace_run_task resource associates, updates and removes Workspace Run tasks.

Example Usage

Basic usage:

resource "tfe_workspace_run_task" "example" {
  workspace_id      = resource.tfe_workspace.example.id
  task_id           = resource.tfe_organization_run_task.example.id
  enforcement_level = "advisory"
}

Argument Reference

The following arguments are supported:

  • enforcement_level - (Required) The enforcement level of the task. Valid values are advisory and mandatory.
  • task_id - (Required) The id of the Run task to associate to the Workspace.
  • workspace_id - (Required) The id of the workspace to associate the Run task to.
  • stage - (Optional) This is currently in BETA. The stage to run the task in. Valid values are pre-plan and post-plan.

Attributes Reference

  • id - The ID of the Workspace Run task.

Import

Run tasks can be imported; use <ORGANIZATION>/<WORKSPACE NAME>/<TASK NAME> as the import ID. For example:

terraform import tfe_workspace_run_task.test my-org-name/workspace/task-name