Skip to content

Commit e7a2598

Browse files
authored
fix: update docs icon paths to be /icon (#82)
This was broken before!
1 parent 67649e0 commit e7a2598

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
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/code.svg"
3333
url = "http://localhost:13337"
3434
share = "owner"
3535
subdomain = false
@@ -71,7 +71,7 @@ resource "coder_app" "intellij" {
7171
- `display_name` (String) A display name to identify the app. Defaults to the slug.
7272
- `external` (Boolean) Specifies whether "url" is opened on the client machine instead of proxied through the workspace.
7373
- `healthcheck` (Block Set, Max: 1) HTTP health checking to determine the application readiness. (see [below for nested schema](#nestedblock--healthcheck))
74-
- `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>"`.
74+
- `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>"`.
7575
- `name` (String, Deprecated) A display name to identify the app.
7676
- `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.
7777
- `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

+1-1
Original file line numberDiff line numberDiff line change
@@ -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/code.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)