mirror of
https://github.com/coder/coder.git
synced 2026-06-07 23:18:20 +00:00
f31e6e09ba
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.
25 lines
541 B
Terraform
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
|
|
}
|