Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
glennsarti committed Aug 2, 2022
1 parent 1a999a9 commit a184e75
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions tfe/data_source_organization_run_task.go
Expand Up @@ -34,6 +34,11 @@ func dataSourceTFEOrganizationRunTask() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
},

"description": {
Type: schema.TypeString,
Optional: true,
},
},
}
}
Expand All @@ -51,6 +56,7 @@ func dataSourceTFEOrganizationRunTaskRead(d *schema.ResourceData, meta interface
d.Set("url", task.URL)
d.Set("category", task.Category)
d.Set("enabled", task.Enabled)
d.Set("description", task.Description)
d.SetId(task.ID)

return nil
Expand Down
2 changes: 2 additions & 0 deletions tfe/data_source_organization_run_task_test.go
Expand Up @@ -28,6 +28,7 @@ func TestAccTFEOrganizationRunTaskDataSource_basic(t *testing.T) {
resource.TestCheckResourceAttr("data.tfe_organization_run_task.foobar", "url", runTasksURL()),
resource.TestCheckResourceAttr("data.tfe_organization_run_task.foobar", "category", "task"),
resource.TestCheckResourceAttr("data.tfe_organization_run_task.foobar", "enabled", "false"),
resource.TestCheckResourceAttr("data.tfe_organization_run_task.foobar", "description", "a description"),
resource.TestCheckResourceAttrSet("data.tfe_organization_run_task.foobar", "id"),
resource.TestCheckResourceAttrSet("data.tfe_organization_run_task.foobar", "organization"),
),
Expand All @@ -49,6 +50,7 @@ resource "tfe_organization_run_task" "foobar" {
name = "foobar-task-%d"
hmac_key = "Password1"
enabled = false
description = "a description"
}
data "tfe_organization_run_task" "foobar" {
Expand Down
5 changes: 3 additions & 2 deletions website/docs/d/organization_run_task.html.markdown
Expand Up @@ -33,6 +33,7 @@ The following arguments are supported:
In addition to all arguments above, the following attributes are exported:

* `category` - The type of task.
* `description` - A short description of the the task.
* `enabled` - Whether the task will be run.
* `id` - The ID of the Run task.
* `url` - URL to send a run task payload.
* `id` - The ID of the task.
* `url` - URL to send a task payload.
2 changes: 2 additions & 0 deletions website/docs/r/organization_run_task.html.markdown
Expand Up @@ -22,6 +22,7 @@ resource "tfe_organization_run_task" "example" {
url = "https://external.service.com"
name = "task-name"
enabled = true
description = "An example task"
}
```

Expand All @@ -31,6 +32,7 @@ The following arguments are supported:

* `category` - (Optional) The type of task.
* `enabled` - (Optional) Whether the task will be run.
* `description` - (Optional) A short description of the the task.
* `hmac_key` - (Optional) HMAC key to verify run task.
* `name` - (Required) Name of the task.
* `organization` - (Required) Name of the organization.
Expand Down

0 comments on commit a184e75

Please sign in to comment.