Terraform Resources for Dev Containers
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- terraform
- Lĩnh vực
- infrastructure
Hướng nghiên cứu
Bắt đầu bằng cách lần theo resource coder_devcontainer và cách nó tương tác với coder_app, coder_script, coder_env và coder_ai_task; sau đó xem xét các tùy chỉnh customizations.coder.modules trong devcontainer.json và đường dẫn coder/preview của coderd. Issue mô tả hai giai đoạn, vì vậy hãy xác nhận phạm vi dự kiến và các tiêu chí nghiệm thu trước khi triển khai; hoàn tất sẽ bao gồm các liên kết resource và hành vi cung cấp module đã được chỉ định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 3
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/internal
-
flake
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
flake
-
flake
Tất cả issue của coder/internal
Issue tương tự
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Automattic/blocks-engine#2161 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
personalrobotics/tsr#128 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Azure/azure-functions-docker#1257 ·