Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Terraform Resources for Dev Containers

オープン
#1,237 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
terraform

調査の方向性

まず coder_devcontainer リソースと、coder_app、coder_script、coder_env、coder_ai_task との相互作用を追跡します。次に、devcontainer.json の customizations.coder.modules と coderd の coder/preview パスを確認します。この issue では 2 つのフェーズが記述されているため、実装前に想定されるスコープと受け入れ基準を確認してください。完了条件には、指定されたリソースの関連付けとモジュールのプロビジョニング動作が含まれます。

索引モデルが issue の本文から書いたものです。

説明

epic

Epic: Terraform Resources for Dev Containers

Summary

Enable template authors to attach Terraform resources (coder_app, coder_script, coder_env, coder_ai_task) to coder_devcontainer resources, eliminating the need to choose between Dev Containers and our collection of Terraform modules.

Problem Statement

Opting in to Dev Containers requires opting out of our collection of Terraform modules as there is no way of associating terraform resources to the coder_devcontainer resource.

Agents used for Dev Containers are created dynamically after workspace provisioning. Since the sub-agent doesn't exist at Terraform plan/apply time, there is no way to reference it in Terraform.

Solution Overview

Phase 1: Terraform-defined Resources

Introduce a computed subagent_id field on the coder_devcontainer resource that can be referenced by other Terraform resources. This ID is pre-computed at plan time and used when the sub-agent is created at runtime.

resource "coder_devcontainer" "main" {
  agent_id         = coder_agent.main.id
  workspace_folder = "/workspaces/project"
}

resource "coder_app" "code_server" {
  agent_id     = coder_devcontainer.main.subagent_id
  slug         = "code-server"
  display_name = "VS Code"
  url          = "http://localhost:8080"
}
Phase 2: devcontainer.json-defined Resources

Enable Terraform modules to be defined directly in devcontainer.json via customizations.coder.modules, allowing developers to attach modules to their dev container without modifying Terraform templates. The modules are provisioned by coderd using coder/preview.

{
  "customizations": {
    "coder": {
      "modules": {
        "registry.coder.com/coder/code-server/coder:1.0.0": {},
        "registry.coder.com/coder/zed/coder:1": {
          "folder": "/home/coder/coder"
        }
      }
    }
  }
}

The key format is <registry link>:<version> and the value is an object of key-value mappings where each key is translated into a Terraform variable.

主要言語
言語のデータがありません
スター
3
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coder/internal のほかの issue

coder/internal の issue をすべて見る

似ている issue

DevOps の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。