File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 33page_title : " coder_task Data Source - terraform-provider-coder"
44subcategory : " "
55description : |-
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" {}
1919data "coder_task" "me" {}
2020
2121resource "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
2626module "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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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" )
Original file line number Diff line number Diff 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 (),
You can’t perform that action at this time.
0 commit comments