mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
feat: allow specifying devcontainer on agent in terraform (#16997)
This change allows specifying devcontainers in terraform and plumbs it through to the agent via agent manifest. This will be used for autostarting devcontainers in a workspace. Depends on coder/terraform-provider-coder#368 Updates #16423
This commit is contained in:
committed by
GitHub
parent
287e3198d8
commit
69ba27e347
20
coderd/database/queries/workspaceagentdevcontainers.sql
Normal file
20
coderd/database/queries/workspaceagentdevcontainers.sql
Normal file
@ -0,0 +1,20 @@
|
||||
-- name: InsertWorkspaceAgentDevcontainers :many
|
||||
INSERT INTO
|
||||
workspace_agent_devcontainers (workspace_agent_id, created_at, id, workspace_folder, config_path)
|
||||
SELECT
|
||||
@workspace_agent_id::uuid AS workspace_agent_id,
|
||||
@created_at::timestamptz AS created_at,
|
||||
unnest(@id::uuid[]) AS id,
|
||||
unnest(@workspace_folder::text[]) AS workspace_folder,
|
||||
unnest(@config_path::text[]) AS config_path
|
||||
RETURNING workspace_agent_devcontainers.*;
|
||||
|
||||
-- name: GetWorkspaceAgentDevcontainersByAgentID :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
workspace_agent_devcontainers
|
||||
WHERE
|
||||
workspace_agent_id = $1
|
||||
ORDER BY
|
||||
created_at, id;
|
Reference in New Issue
Block a user