Skip to content

Commit 11bc994

Browse files
committed
address PR comments
1 parent 1983ed0 commit 11bc994

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

docs/data-sources/task.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
page_title: "coder_task Data Source - terraform-provider-coder"
44
subcategory: ""
55
description: |-
6-
Use this data source to read information about Coder tasks.
6+
Use this data source to read information about Coder Tasks.
77
---
88

99
# coder_task (Data Source)
1010

11-
Use this data source to read information about Coder tasks.
11+
Use this data source to read information about Coder Tasks.
1212

1313
## Example Usage
1414

@@ -19,13 +19,13 @@ data "coder_workspace" "me" {}
1919
data "coder_task" "me" {}
2020
2121
resource "coder_ai_task" "task" {
22-
count = data.coder_task.me.enabled ? data.coder_workspace.me.start_count : 0
23-
app_id = module.example-agent.task_app_id
22+
count = data.coder_task.me.enabled ? data.coder_workspace.me.start_count : 0
23+
app_id = module.example-agent.task_app_id
2424
}
2525
2626
module "example-agent" {
27-
count = data.coder_task.me.enabled ? data.coder_workspace.me.start_count : 0
28-
prompt = data.coder_ai_task.me.prompt
27+
count = data.coder_task.me.enabled ? data.coder_workspace.me.start_count : 0
28+
prompt = data.coder_ai_task.me.prompt
2929
}
3030
```
3131

provider/ai_task.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ func aiTaskResource() *schema.Resource {
116116
}
117117
}
118118

119-
func aiTaskDatasource() *schema.Resource {
119+
func taskDatasource() *schema.Resource {
120120
return &schema.Resource{
121-
Description: "Use this data source to read information about Coder tasks.",
121+
Description: "Use this data source to read information about Coder Tasks.",
122122
ReadContext: func(ctx context.Context, rd *schema.ResourceData, i interface{}) diag.Diagnostics {
123123
diags := diag.Diagnostics{}
124124

provider/ai_task_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func TestAITask(t *testing.T) {
216216
})
217217
}
218218

219-
func TestAITaskPromptDatasource(t *testing.T) {
219+
func TestTaskDatasource(t *testing.T) {
220220
t.Run("Exists", func(t *testing.T) {
221221
t.Setenv("CODER_TASK_ID", "7d8d4c2e-fb57-44f9-a183-22509819c2e7")
222222
t.Setenv("CODER_TASK_PROMPT", "some task prompt")

provider/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func New() *schema.Provider {
6464
"coder_external_auth": externalAuthDataSource(),
6565
"coder_workspace_owner": workspaceOwnerDataSource(),
6666
"coder_workspace_preset": workspacePresetDataSource(),
67-
"coder_task": aiTaskDatasource(),
67+
"coder_task": taskDatasource(),
6868
},
6969
ResourcesMap: map[string]*schema.Resource{
7070
"coder_agent": agentResource(),

0 commit comments

Comments
 (0)