-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: update coder/dogfood template to reference coder_task.prompt #20416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mafredri
left a comment
There was a problem hiding this 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 👍🏻
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 | |||
There was a problem hiding this comment.
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
7c28bf6 to
e9efb79
Compare
mafredri
left a comment
There was a problem hiding this 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.
|
Smoke-tested with https://dev.coder.com/templates/coder/coder/versions/gh-20416-testing-3 |
Relates to coder/internal#1065
Updates the coder/dogfood template to reference new Task features in provider version
2.12.02.13.0:coder_ai_taskresource and acoder_taskdata sourcecoder_task.me.promptinto Claude Code moduleUpdate: to avoid a cycle that only appears to occur when using a
count, leveraging a data source (ref: coder/terraform-provider-coder#460)