Files
coder/provisioner/terraform/testdata/resources/ai-tasks-multiple/main.tf
T
Danielle Maywood f31e6e09ba chore(provisioner): support updated coder_ai_task resource (#20160)
Closes https://github.com/coder/internal/issues/978

- Introduce `CODER_TASK_ID` and `CODER_TASK_PROMPT` to the provisioner
environment
- Make use of new `app_id` field in provider, with a fallback to
`sidebar_app.id` for backwards compatibility

**For now** I've left the `taskPrompt` and `taskID` as a TODO as we do
not yet create these values.
2025-10-09 10:42:01 +01:00

25 lines
541 B
Terraform

terraform {
required_providers {
coder = {
source = "coder/coder"
version = ">= 2.0.0"
}
}
}
data "coder_provisioner" "me" {}
data "coder_workspace" "me" {}
data "coder_workspace_owner" "me" {}
resource "coder_ai_task" "a" {
count = 1
sidebar_app {
id = "5ece4674-dd35-4f16-88c8-82e40e72e2fd" # fake ID to satisfy requirement, irrelevant otherwise
}
}
resource "coder_ai_task" "b" {
count = 1
app_id = "5ece4674-dd35-4f16-88c8-82e40e72e2fd" # fake ID to satisfy requirement, irrelevant otherwise
}