Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 823b02a

Browse files
authored
docs: deprecate name arg (#5026)
1 parent 4b7c710 commit 823b02a

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

docs/ides/web-ides.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ vim main.tf
4646

4747
```hcl
4848
resource "coder_agent" "main" {
49-
arch = "amd64"
50-
os = "linux"
49+
arch = "amd64"
50+
os = "linux"
5151
startup_script = <<EOF
5252
#!/bin/sh
5353
# install and start code-server
@@ -140,9 +140,9 @@ Configure your agent and `coder_app` like so to use Jupyter:
140140
data "coder_workspace" "me" {}
141141
142142
resource "coder_agent" "coder" {
143-
os = "linux"
144-
arch = "amd64"
145-
dir = "/home/coder"
143+
os = "linux"
144+
arch = "amd64"
145+
dir = "/home/coder"
146146
startup_script = <<-EOF
147147
pip3 install jupyterlab
148148
$HOME/.local/bin/jupyter lab --ServerApp.token='' --ip='*'
@@ -176,9 +176,9 @@ Configure your agent and `coder_app` like so to use RStudio. Notice the
176176

177177
```hcl
178178
resource "coder_agent" "coder" {
179-
os = "linux"
180-
arch = "amd64"
181-
dir = "/home/coder"
179+
os = "linux"
180+
arch = "amd64"
181+
dir = "/home/coder"
182182
startup_script = <<EOT
183183
#!/bin/bash
184184
# start rstudio
@@ -189,11 +189,12 @@ EOT
189189
# rstudio
190190
resource "coder_app" "rstudio" {
191191
agent_id = coder_agent.coder.id
192-
name = "rstudio"
193-
icon = "/icon/rstudio.svg"
192+
slug = "rstudio"
193+
display_name = "R Studio"
194+
icon = "https://upload.wikimedia.org/wikipedia/commons/d/d0/RStudio_logo_flat.svg"
194195
url = "http://localhost:8787"
195-
subdomain = true
196-
share = "owner"
196+
subdomain = true
197+
share = "owner"
197198
198199
healthcheck {
199200
url = "http://localhost:8787/healthz"
@@ -214,7 +215,7 @@ Configure your agent and `coder_app` like so to use Airflow. Notice the
214215
resource "coder_agent" "coder" {
215216
os = "linux"
216217
arch = "amd64"
217-
dir = "/home/coder"
218+
dir = "/home/coder"
218219
startup_script = <<EOT
219220
#!/bin/bash
220221
# install and start airflow
@@ -225,11 +226,12 @@ EOT
225226
226227
resource "coder_app" "airflow" {
227228
agent_id = coder_agent.coder.id
228-
name = "airflow"
229+
slug = "airflow"
230+
display_name = "Airflow"
229231
icon = "https://upload.wikimedia.org/wikipedia/commons/d/de/AirflowLogo.png"
230232
url = "http://localhost:8080"
231-
subdomain = true
232-
share = "owner"
233+
subdomain = true
234+
share = "owner"
233235
234236
healthcheck {
235237
url = "http://localhost:8080/healthz"

docs/networking/port-forwarding.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,21 @@ One way to port forward in the dashboard is to use the "Port forward" button to
6161

6262
Another way to port forward is to configure a `coder_app` resource in the workspace's template. This approach shows a visual application icon in the dashboard. See the following `coder_app` example for a Node React app and note the `subdomain` and `share` settings:
6363

64-
```sh
64+
```hcl
6565
# node app
6666
resource "coder_app" "node-react-app" {
67-
agent_id = coder_agent.dev.id
68-
name = "node-react-app"
69-
icon = "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/React-icon.svg/2300px-React-icon.svg.png"
70-
url = "http://localhost:3000"
67+
agent_id = coder_agent.dev.id
68+
slug = "node-react-app"
69+
icon = "https://upload.wikimedia.org/wikipedia/commons/a/a7/React-icon.svg"
70+
url = "http://localhost:3000"
7171
subdomain = true
7272
share = "authenticated"
7373
7474
healthcheck {
7575
url = "http://localhost:3000/healthz"
7676
interval = 10
7777
threshold = 30
78-
}
78+
}
7979
8080
}
8181
```

0 commit comments

Comments
 (0)