You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: deprecate coder_ai_task and coder_task (#539)
* chore: deprecate coder_ai_task and coder_task
Coder Tasks is deprecated as of Coder v2.36 and superseded by Coder Agents. Mark the coder_ai_task resource, the coder_task data source and their attributes as deprecated so Terraform emits warnings and the registry docs point at the migration guide.
* chore: deprecate nested sidebar_app.id and exported AI task types
Also fixes a broken reference in the coder_task example, which pointed at a non-existent coder_ai_task data source.
* fix: correct Tasks deprecation to v2.34 and add ESR wording
---------
Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/data-sources/task.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,15 @@ page_title: "coder_task Data Source - terraform-provider-coder"
4
4
subcategory: ""
5
5
description: |-
6
6
Use this data source to read information about Coder Tasks.
7
+
~> Deprecated: Coder Tasks is deprecated as of Coder v2.34 and will be removed in a future release. Starting June 2, 2026, Coder Tasks moves to a 12-month Extended Support Release (ESR) for Premium customers. Templates no longer require AI task resources; use Coder Agents https://coder.com/docs/ai-coder/agents and follow the migration guide https://coder.com/docs/ai-coder/agents/tasks-to-chats-migration. Coder Tasks documentation remains available in the v2.36 documentation https://coder.com/docs/@v2.36.3/ai-coder/tasks.
7
8
---
8
9
9
10
# coder_task (Data Source)
10
11
11
12
Use this data source to read information about Coder Tasks.
12
13
14
+
~> **Deprecated**: Coder Tasks is deprecated as of Coder v2.34 and will be removed in a future release. Starting June 2, 2026, Coder Tasks moves to a 12-month Extended Support Release (ESR) for Premium customers. Templates no longer require AI task resources; use [Coder Agents](https://coder.com/docs/ai-coder/agents) and follow the [migration guide](https://coder.com/docs/ai-coder/agents/tasks-to-chats-migration). Coder Tasks documentation remains available in the [v2.36 documentation](https://coder.com/docs/@v2.36.3/ai-coder/tasks).
-`enabled` (Boolean) True when executing in a Coder Task context, false when in a Coder Workspace context.
40
+
-`enabled` (Boolean, Deprecated) True when executing in a Coder Task context, false when in a Coder Workspace context.
38
41
39
42
-> The `enabled` field is only populated in Coder v2.28 and later.
40
43
-`id` (String) The UUID of the task, if executing in a Coder Task context. Empty in a Coder Workspace context.
41
-
-`prompt` (String) The prompt text provided to the task by Coder, if executing in a Coder Task context. Empty in a Coder Workspace context.
44
+
-`prompt` (String, Deprecated) The prompt text provided to the task by Coder, if executing in a Coder Task context. Empty in a Coder Workspace context.
42
45
43
46
-> The `prompt` field is only populated in Coder v2.28 and later.
~> Deprecated: Coder Tasks is deprecated as of Coder v2.34 and will be removed in a future release. Starting June 2, 2026, Coder Tasks moves to a 12-month Extended Support Release (ESR) for Premium customers. Templates no longer require AI task resources; use Coder Agents https://coder.com/docs/ai-coder/agents and follow the migration guide https://coder.com/docs/ai-coder/agents/tasks-to-chats-migration. Coder Tasks documentation remains available in the v2.36 documentation https://coder.com/docs/@v2.36.3/ai-coder/tasks.
7
8
---
8
9
9
10
# coder_ai_task (Resource)
10
11
11
12
Use this resource to define Coder tasks.
12
13
14
+
~> **Deprecated**: Coder Tasks is deprecated as of Coder v2.34 and will be removed in a future release. Starting June 2, 2026, Coder Tasks moves to a 12-month Extended Support Release (ESR) for Premium customers. Templates no longer require AI task resources; use [Coder Agents](https://coder.com/docs/ai-coder/agents) and follow the [migration guide](https://coder.com/docs/ai-coder/agents/tasks-to-chats-migration). Coder Tasks documentation remains available in the [v2.36 documentation](https://coder.com/docs/@v2.36.3/ai-coder/tasks).
15
+
13
16
14
17
15
18
<!-- schema generated by tfplugindocs -->
16
19
## Schema
17
20
18
21
### Optional
19
22
20
-
-`app_id` (String) The ID of the `coder_app` resource that provides the AI interface for this task.
23
+
-`app_id` (String, **Deprecated**: Coder Tasks is deprecated as of Coder v2.34 and will be removed in a future release.) The ID of the `coder_app` resource that provides the AI interface for this task.
21
24
-`sidebar_app` (Block Set, Max: 1, Deprecated) The coder_app to display in the sidebar. Usually a chat interface with the AI agent running in the workspace, like https://github.com/coder/agentapi. (see [below for nested schema](#nestedblock--sidebar_app))
22
25
23
26
### Read-Only
24
27
25
-
-`enabled` (Boolean) True when executing in a Coder Task context, false when in a Coder Workspace context.
28
+
-`enabled` (Boolean, Deprecated) True when executing in a Coder Task context, false when in a Coder Workspace context.
26
29
27
30
-> The `enabled` field is only populated in Coder v2.28 and later.
28
31
-`id` (String) A unique identifier for this resource.
29
-
-`prompt` (String) The prompt text provided to the task by Coder.
32
+
-`prompt` (String, Deprecated) The prompt text provided to the task by Coder.
30
33
31
34
-> The `prompt` field is only populated in Coder v2.28 and later.
32
35
@@ -35,4 +38,4 @@ Use this resource to define Coder tasks.
35
38
36
39
Required:
37
40
38
-
-`id` (String) A reference to an existing `coder_app` resource in your template.
41
+
-`id` (String, Deprecated) A reference to an existing `coder_app` resource in your template.
// TaskPromptParameterName is the name of the parameter which is *required* to be defined when a coder_ai_task is used.
31
+
//
32
+
// Deprecated: Coder Tasks is deprecated as of Coder v2.34. Task prompts are read
33
+
// from the task itself, not from a parameter.
25
34
constTaskPromptParameterName="AI Prompt"
26
35
36
+
// aiTaskDeprecationMessage is surfaced by Terraform whenever a deprecated AI
37
+
// task resource or data source is used.
38
+
constaiTaskDeprecationMessage="Coder Tasks is deprecated as of Coder v2.34 and will be removed in a future release. Use Coder Agents instead: https://coder.com/docs/ai-coder/agents/tasks-to-chats-migration"
39
+
40
+
// aiTaskAttributeDeprecationMessage is surfaced by Terraform whenever a
41
+
// deprecated AI task attribute is used. It is kept short because it is rendered
42
+
// inline in the generated attribute documentation.
43
+
constaiTaskAttributeDeprecationMessage="Coder Tasks is deprecated as of Coder v2.34 and will be removed in a future release."
44
+
45
+
// aiTaskDeprecationNotice is rendered in the generated documentation.
46
+
constaiTaskDeprecationNotice="\n\n~> **Deprecated**: Coder Tasks is deprecated as of Coder v2.34 and will be removed in a future release. Starting June 2, 2026, Coder Tasks moves to a 12-month Extended Support Release (ESR) for Premium customers. Templates no longer require AI task resources; use [Coder Agents](https://coder.com/docs/ai-coder/agents) and follow the [migration guide](https://coder.com/docs/ai-coder/agents/tasks-to-chats-migration). Coder Tasks documentation remains available in the [v2.36 documentation](https://coder.com/docs/@v2.36.3/ai-coder/tasks)."
47
+
27
48
funcaiTaskResource() *schema.Resource {
28
49
return&schema.Resource{
29
50
SchemaVersion: 1,
30
51
31
-
Description: "Use this resource to define Coder tasks.",
52
+
DeprecationMessage: aiTaskDeprecationMessage,
53
+
Description: "Use this resource to define Coder tasks."+aiTaskDeprecationNotice,
Description: "The coder_app to display in the sidebar. Usually a chat interface with the AI agent running in the workspace, like https://github.com/coder/agentapi.",
79
-
Deprecated: "This field has been deprecated in favor of the `app_id` field.",
101
+
Deprecated: "This field has been deprecated in favor of the `app_id` field. "+aiTaskAttributeDeprecationMessage,
Description: "True when executing in a Coder Task context, false when in a Coder Workspace context.\n\n -> The `enabled` field is only populated in Coder v2.28 and later.",
Description: "The prompt text provided to the task by Coder, if executing in a Coder Task context. Empty in a Coder Workspace context.\n\n -> The `prompt` field is only populated in Coder v2.28 and later.",
149
177
},
150
178
"enabled": {
151
179
Type: schema.TypeBool,
152
180
Computed: true,
181
+
Deprecated: aiTaskAttributeDeprecationMessage,
153
182
Description: "True when executing in a Coder Task context, false when in a Coder Workspace context.\n\n -> The `enabled` field is only populated in Coder v2.28 and later.",
0 commit comments