Skip to content

Conversation

@johnstcn
Copy link
Member

@johnstcn johnstcn commented Oct 22, 2025

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
@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
Copy link
Member

@mafredri mafredri left a comment

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 👍🏻

@@ -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
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
Copy link
Member

@mafredri mafredri left a comment

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
Copy link
Member Author

johnstcn commented Nov 6, 2025

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
25 checks passed
@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.

4 participants