Skip to content

chore: update coder/dogfood template to reference coder_task.prompt - #20416

Merged
johnstcn merged 7 commits into
mainfrom
cj/coder/dogfood/tasks-refactor
Nov 6, 2025
Merged

johnstcn merged 7 commits into
mainfrom
cj/coder/dogfood/tasks-refactor

Conversation

@johnstcn

@johnstcn johnstcn commented Oct 22, 2025 •

Copy link
Copy Markdown
Member

Relates to coder/internal#1065

Updates the coder/dogfood template to reference new Task features in provider version 2.12.0 2.13.0:

Update: to avoid a cycle that only appears to occur when using a count, leveraging a data source (ref: coder/terraform-provider-coder#460)

@johnstcn johnstcn self-assigned this Oct 22, 2025
Comment thread dogfood/coder/main.tf Resolved
@github-actions github-actions Bot added the stale This issue is like stale bread. label Oct 30, 2025
@github-actions github-actions Bot closed this Nov 2, 2025
@johnstcn johnstcn reopened this Nov 3, 2025
@johnstcn johnstcn removed the stale This issue is like stale bread. label Nov 3, 2025

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good once updated to match latest provider behavior 👍🏻

Comment thread dogfood/coder/main.tf Resolved
Comment thread dogfood/coder/main.tf Resolved
Comment thread dogfood/coder/main.tf Outdated
@@ -879,7 +899,7 @@ resource "coder_script" "develop_sh" {
}

resource "coder_app" "preview" {
count = local.has_ai_prompt ? data.coder_workspace.me.start_count : 0
count = local.is_task ? data.coder_workspace.me.start_count : 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing this, it could be nice to have a coder_ai_task.start_count, but perhaps that's more confusing than useful.

Relates to coder/internal#1065

Updates the coder/dogfood template to reference new Task features
in provider version 2.12.0:
- Adds a `coder_ai_task` resource
- Passes `coder_ai_task.task.prompt` into Claude Code module
- Updates Claude Code module to 4.0.0 (ref:
  coder/registry#488)
- Removes "AI Prompt" parameter
@johnstcn
johnstcn force-pushed the cj/coder/dogfood/tasks-refactor branch from 7c28bf6 to e9efb79 Compare November 3, 2025 22:05
@johnstcn
johnstcn requested a review from mafredri November 4, 2025 13:43
@johnstcn
johnstcn marked this pull request as ready for review November 4, 2025 13:43

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would perhaps make sense to have a data.coder_task.me.start_count like workspaces. Avoids the ternary operator.

@johnstcn

johnstcn commented Nov 6, 2025

Copy link
Copy Markdown
Member Author

Smoke-tested with https://dev.coder.com/templates/coder/coder/versions/gh-20416-testing-3

@johnstcn
johnstcn merged commit 2cec1db into main Nov 6, 2025
@johnstcn
johnstcn deleted the cj/coder/dogfood/tasks-refactor branch November 6, 2025 15:00
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants