layout | page_title | sidebar_current | description |
---|---|---|---|
tfe |
Terraform Enterprise: tfe_workspace_run_task |
docs-resource-tfe_workspace_run_task |
Manages Workspace Run tasks. |
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.
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"
}
The following arguments are supported:
enforcement_level
- (Required) The enforcement level of the task. Valid values areadvisory
andmandatory
.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 arepre-plan
andpost-plan
.
id
- The ID of the Workspace Run task.
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