Skip to content

Commit 0101f7b

Browse files
committed
fix: update docs icon paths to be /icon
This was broken before!
1 parent b76ad54 commit 0101f7b

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

docs/resources/app.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resource "coder_app" "code-server" {
2929
agent_id = coder_agent.dev.id
3030
slug = "code-server"
3131
display_name = "VS Code"
32-
icon = data.coder_workspace.me.access_url + "/icons/vscode.svg"
32+
icon = data.coder_workspace.me.access_url + "/icon/vscode.svg"
3333
url = "http://localhost:13337"
3434
share = "owner"
3535
subdomain = false
@@ -70,7 +70,7 @@ resource "coder_app" "intellij" {
7070
- `command` (String) A command to run in a terminal opening this app. In the web, this will open in a new tab. In the CLI, this will SSH and execute the command. Either "command" or "url" may be specified, but not both.
7171
- `display_name` (String) A display name to identify the app. Defaults to the slug.
7272
- `healthcheck` (Block Set, Max: 1) HTTP health checking to determine the application readiness. (see [below for nested schema](#nestedblock--healthcheck))
73-
- `icon` (String) A URL to an icon that will display in the dashboard. View built-in icons here: https://github.com/coder/coder/tree/main/site/static/icons. Use a built-in icon with `data.coder_workspace.me.access_url + "/icons/<path>"`.
73+
- `icon` (String) A URL to an icon that will display in the dashboard. View built-in icons here: https://github.com/coder/coder/tree/main/site/static/icons. Use a built-in icon with `data.coder_workspace.me.access_url + "/icon/<path>"`.
7474
- `name` (String, Deprecated) A display name to identify the app.
7575
- `relative_path` (Boolean, Deprecated) Specifies whether the URL will be accessed via a relative path or wildcard. Use if wildcard routing is unavailable. Defaults to true.
7676
- `share` (String) Determines the "level" which the application is shared at. Valid levels are "owner" (default), "authenticated" and "public". Level "owner" disables sharing on the app, so only the workspace owner can access it. Level "authenticated" shares the app with all authenticated users. Level "public" shares it with any user, including unauthenticated users. Permitted application sharing levels can be configured site-wide via a flag on `coder server` (Enterprise only).

docs/resources/metadata.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resource "coder_metadata" "pod_info" {
2929
count = data.coder_workspace.me.start_count
3030
resource_id = kubernetes_pod.dev[0].id
3131
# (Enterprise-only) this resource consumes 200 quota units
32-
cost = 200
32+
daily_cost = 200
3333
item {
3434
key = "description"
3535
value = "This description will show up in the Coder dashboard."
@@ -58,7 +58,7 @@ resource "coder_metadata" "pod_info" {
5858

5959
- `daily_cost` (Number) (Enterprise) The cost of this resource every 24 hours. Use the smallest denomination of your preferred currency. For example, if you work in USD, use cents.
6060
- `hide` (Boolean) Hide the resource from the UI.
61-
- `icon` (String) A URL to an icon that will display in the dashboard. View built-in icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a built-in icon with `data.coder_workspace.me.access_url + "/icons/<path>"`.
61+
- `icon` (String) A URL to an icon that will display in the dashboard. View built-in icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a built-in icon with `data.coder_workspace.me.access_url + "/icon/<path>"`.
6262
- `item` (Block List) Each "item" block defines a single metadata item consisting of a key/value pair. (see [below for nested schema](#nestedblock--item))
6363

6464
### Read-Only

examples/resources/coder_app/resource.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ resource "coder_app" "code-server" {
1414
agent_id = coder_agent.dev.id
1515
slug = "code-server"
1616
display_name = "VS Code"
17-
icon = data.coder_workspace.me.access_url + "/icons/vscode.svg"
17+
icon = data.coder_workspace.me.access_url + "/icon/vscode.svg"
1818
url = "http://localhost:13337"
1919
share = "owner"
2020
subdomain = false

provider/app.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func appResource() *schema.Resource {
5656
Type: schema.TypeString,
5757
Description: "A URL to an icon that will display in the dashboard. View built-in " +
5858
"icons here: https://github.com/coder/coder/tree/main/site/static/icons. Use a " +
59-
"built-in icon with `data.coder_workspace.me.access_url + \"/icons/<path>\"`.",
59+
"built-in icon with `data.coder_workspace.me.access_url + \"/icon/<path>\"`.",
6060
ForceNew: true,
6161
Optional: true,
6262
ValidateFunc: func(i interface{}, s string) ([]string, []error) {

provider/metadata.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func metadataResource() *schema.Resource {
5050
Type: schema.TypeString,
5151
Description: "A URL to an icon that will display in the dashboard. View built-in " +
5252
"icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a " +
53-
"built-in icon with `data.coder_workspace.me.access_url + \"/icons/<path>\"`.",
53+
"built-in icon with `data.coder_workspace.me.access_url + \"/icon/<path>\"`.",
5454
ForceNew: true,
5555
Optional: true,
5656
ValidateFunc: func(i interface{}, s string) ([]string, []error) {

provider/metadata_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestMetadata(t *testing.T) {
3030
resource "coder_metadata" "agent" {
3131
resource_id = coder_agent.dev.id
3232
hide = true
33-
icon = "/icons/storage.svg"
33+
icon = "/icon/storage.svg"
3434
daily_cost = 200
3535
item {
3636
key = "foo"
@@ -65,7 +65,7 @@ func TestMetadata(t *testing.T) {
6565
for key, expected := range map[string]string{
6666
"resource_id": agent.Primary.Attributes["id"],
6767
"hide": "true",
68-
"icon": "/icons/storage.svg",
68+
"icon": "/icon/storage.svg",
6969
"daily_cost": "200",
7070
"item.#": "5",
7171
"item.0.key": "foo",
@@ -112,7 +112,7 @@ func TestMetadataDuplicateKeys(t *testing.T) {
112112
resource "coder_metadata" "agent" {
113113
resource_id = coder_agent.dev.id
114114
hide = true
115-
icon = "/icons/storage.svg"
115+
icon = "/icon/storage.svg"
116116
item {
117117
key = "foo"
118118
value = "bar"

0 commit comments

Comments
 (0)