Skip to content

coder terraform provider: add coder_task data source and add task_id / app_id to coder_ai_task resource #977

@johnstcn

Description

@johnstcn

Create a new coder_task data source that exposes the following information:

  • Task ID (UUID) from CODER_TASK_ID
  • Task prompt / input (string) from CODER_TASK_PROMPT

Add the required fields to the coder_ai_task resource:

  • task_id (required)
  • app_id

Deprecate the sidebar_app field of the coder_ai_task resource in favour of app_id.

As a compatibility measure, we can add logic to set app_id from sidebar_app.id.

Example usage:

resource "coder_agent" "main" { ... }
resource "coder_app" "claude_code_web" { ... }

data "coder_task" "task" {}
resource "coder_ai_task" "task" {
  task_id = data.coder_task.task.id
  app_id = coder_app.claude_code_web.id
  // alternatively, for backward compat:
  //sidebar_app {
  //  id = coder_app.claude_code_web.id
  //}
}

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions