Add better support for agent names (i.e. FQDN for a workspace agent)
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
調査の方向性
まず、データソース 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_idthat is currently already being provided - (Optional) provide a FQDN like
<agent>.<workspace>.<owner>.coderto 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
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/terraform-provider-coder のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
coder/terraform-provider-coder#517 · コメント 1 件 ·
-
`coder_devcontainer`: sub-agent name collides when using `for_each` / `count`; no way to override再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
coder/terraform-provider-coder の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
containerd/containerd#14476 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ome-projects/ome#1242 ·
メンテナーはふだん 1 日以内に返信
-
copy design-review mac P3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
tosunlab/hisarapp-core#510 ·