-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit updates the documentation and changelog for the Global Run Tasks feature.
- Loading branch information
1 parent
431ba41
commit 072749e
Showing
5 changed files
with
100 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
website/docs/d/organization_run_task_global_settings.html.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
layout: "tfe" | ||
page_title: "Terraform Enterprise: tfe_organization_run_task_global_settings" | ||
description: |- | ||
Get information on a Run task's global settings. | ||
--- | ||
|
||
# Data Source: tfe_organization_run_task_global_settings | ||
|
||
[Run tasks](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks) allow HCP Terraform to interact with external systems at specific points in the HCP Terraform run lifecycle. Run tasks are reusable configurations that you can attach to any workspace in an organization. | ||
|
||
The tfe_organization_run_task_global_settings resource creates, updates and destroys the [global settings](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks#global-run-tasks) for an [Organization Run task](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks#creating-a-run-task). Your organization must have the `global-run-task` [entitlement](https://developer.hashicorp.com/terraform/cloud-docs/api-docs#feature-entitlements) to use global run tasks. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
data "tfe_organization_run_task_global_settings" "example" { | ||
task_id = "task-abc123" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `task_id` - (Required) The id of the Run task with the global settings. | ||
|
||
## Attributes Reference | ||
|
||
In addition to all arguments above, the following attributes are exported: | ||
|
||
* `enabled` - Whether the run task will be applied globally. | ||
* `enforcement_level` - The enforcement level of the global task. Valid values are `advisory` and `mandatory`. | ||
* `stages` - The stages to run the task in. Valid values are one or more of `pre_plan`, `post_plan`, `pre_apply` and `post apply`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
website/docs/r/organization_run_task_global_settings.html.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
layout: "tfe" | ||
page_title: "Terraform Enterprise: tfe_organization_run_task_global_settings" | ||
description: |- | ||
Manages Run tasks global settings. | ||
--- | ||
|
||
# tfe_organization_run_task_global_settings | ||
|
||
[Run tasks](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks) allow HCP Terraform to interact with external systems at specific points in the HCP Terraform run lifecycle. Run tasks are reusable configurations that you can attach to any workspace in an organization. | ||
|
||
The tfe_organization_run_task_global_settings resource creates, updates and destroys the [global settings](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks#global-run-tasks) for an [Organization Run task](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks#creating-a-run-task). Your organization must have the `global-run-task` [entitlement](https://developer.hashicorp.com/terraform/cloud-docs/api-docs#feature-entitlements) to use global run tasks. | ||
|
||
## Example Usage | ||
|
||
Basic usage: | ||
|
||
```hcl | ||
resource "tfe_organization_run_task_global_settings" "example" { | ||
task_id = tfe_organization_run_task.example.id | ||
enabled = true | ||
enforcement_level = "advisory" | ||
stages = ["pre_plan", "post_plan"] | ||
} | ||
resource "tfe_organization_run_task" "example" { | ||
organization = "org-name" | ||
url = "https://external.service.com" | ||
name = "task-name" | ||
enabled = true | ||
description = "An example task" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `enabled` - (Optional) Whether the run task will be applied globally. | ||
* `enforcement_level` - (Required) The enforcement level of the global task. Valid values are `advisory` and `mandatory`. | ||
* `stages` - (Required) The stages to run the task in. Valid values are one or more of `pre_plan`, `post_plan`, `pre_apply` and `post apply`. | ||
* `task_id` - (Required) The id of the Run task which will have the global settings applied. | ||
|
||
## Attributes Reference | ||
|
||
* `id` - The ID of the global settings. | ||
|
||
## Import | ||
|
||
Run task global settings can be imported; use `<ORGANIZATION NAME>/<TASK NAME>` as the | ||
import ID. For example: | ||
|
||
```shell | ||
terraform import tfe_organization_run_task_global_settings.test my-org-name/task-name | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters