mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add new required slug property to coder_app, use in URLs (#4573)
This commit is contained in:
+17
-13
@@ -19,7 +19,8 @@ be used as a Coder application. For example:
|
||||
# Note: Portainer must be already running in the workspace
|
||||
resource "coder_app" "portainer" {
|
||||
agent_id = coder_agent.main.id
|
||||
name = "portainer"
|
||||
slug = "portainer"
|
||||
display_name = "Portainer"
|
||||
icon = "https://simpleicons.org/icons/portainer.svg"
|
||||
url = "https://localhost:9443/api/status"
|
||||
|
||||
@@ -75,10 +76,11 @@ You'll also need to specify a `coder_app` resource related to the agent. This is
|
||||
|
||||
```hcl
|
||||
resource "coder_app" "code-server" {
|
||||
agent_id = coder_agent.main.id
|
||||
name = "code-server"
|
||||
url = "http://localhost:13337/?folder=/home/coder"
|
||||
icon = "/icon/code.svg"
|
||||
agent_id = coder_agent.main.id
|
||||
slug = "code-server"
|
||||
display_name = "code-server"
|
||||
url = "http://localhost:13337/?folder=/home/coder"
|
||||
icon = "/icon/code.svg"
|
||||
|
||||
healthcheck {
|
||||
url = "http://localhost:13337/healthz"
|
||||
@@ -179,10 +181,11 @@ EOT
|
||||
}
|
||||
|
||||
resource "coder_app" "intellij" {
|
||||
agent_id = coder_agent.coder.id
|
||||
name = "${var.jetbrains-ide}"
|
||||
icon = "/icon/intellij.svg"
|
||||
url = "http://localhost:8997/"
|
||||
agent_id = coder_agent.coder.id
|
||||
slug = "intellij"
|
||||
display_name = "${var.jetbrains-ide}"
|
||||
icon = "/icon/intellij.svg"
|
||||
url = "http://localhost:8997/"
|
||||
|
||||
healthcheck {
|
||||
url = "http://localhost:8997/"
|
||||
@@ -233,10 +236,11 @@ EOF
|
||||
}
|
||||
|
||||
resource "coder_app" "jupyter" {
|
||||
agent_id = coder_agent.coder.id
|
||||
name = "JupyterLab"
|
||||
url = "http://localhost:8888${local.jupyter_base_path}"
|
||||
icon = "/icon/jupyter.svg"
|
||||
agent_id = coder_agent.coder.id
|
||||
slug = "jupyter"
|
||||
display_name = "JupyterLab"
|
||||
url = "http://localhost:8888${local.jupyter_base_path}"
|
||||
icon = "/icon/jupyter.svg"
|
||||
|
||||
healthcheck {
|
||||
url = "http://localhost:8888${local.jupyter_base_path}"
|
||||
|
||||
Reference in New Issue
Block a user