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

Add better support for agent names (i.e. FQDN for a workspace agent)

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go, terraform
領域
tooling

調査の方向性

まず、データソース coder_workspace、coder_app、coder モジュール、および既存の agent_id フローを追跡します。提案されている agents[var.agent_id].name の検索と、環境変数の置換アプローチを比較し、そのうえでどの要件がサポートされるかを定義します。ユーザーがエージェント名をハードコードせずにエージェント名または FQDNs を導出でき、オプションの動作が明示的に確定されていれば完了です。

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

説明

At present, there is no good way to extract the agent name from Terraform and use it within the template. This is relevant for coder_app's or anything else that wishes to create a working link to the workspace (agent) in a multi-agent environment.

Typically users have been able to use either <agent>.<workspace> or <workspace>.<agent>, and this will resolve to the correct agent when there is only one.

In Coder Desktop for example, using multiple agents means the FQDN becomes <agent>.<workspace>.me.coder or <agent>.<workspace>.<username>.coder and the short version <agent>.<workspace> no longer works.

This is problematic especially in Coder modules as they cannot create URLs for the apps without asking the user to provide the agent name which can only be represented via a static sting in terraform. Resource names cannot be inspected which is where the name comes from.

Requirements:

  • The user doesn't need to hard-code a string value for the agent name when
    • Using coder modules
    • Writing coder_apps
  • (Optional, but ideal) the user only needs to provide the agent_id that is currently already being provided
  • (Optional) provide a FQDN like <agent>.<workspace>.<owner>.coder to access the agent

The optional requirement could perhaps be achieved via some form of new data on the coder_workspace data source so that a lookup can be performed:

coder_workspace.me.agents[var.agent_id].name

Open to ideas on how and where to solve this.


There also exists a precedent for using fake environment variables and the product supports replacements of $SESSION_TOKEN for coder_app URLs, this is one potential avenue to achieve the same, albeit not ideal.

主要言語
Go
スター
62
フォーク
28
平均マージ
4日 18時間
マージ済み PR(30日)
3

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

coder/terraform-provider-coder のほかの issue

coder/terraform-provider-coder の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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