Skip to content

fix: update docs icon paths to be /icon/ #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/resources/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "coder_app" "code-server" {
agent_id = coder_agent.dev.id
slug = "code-server"
display_name = "VS Code"
icon = data.coder_workspace.me.access_url + "/icons/vscode.svg"
icon = data.coder_workspace.me.access_url + "/icon/code.svg"
url = "http://localhost:13337"
share = "owner"
subdomain = false
Expand Down Expand Up @@ -70,7 +70,7 @@ resource "coder_app" "intellij" {
- `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.
- `display_name` (String) A display name to identify the app. Defaults to the slug.
- `healthcheck` (Block Set, Max: 1) HTTP health checking to determine the application readiness. (see [below for nested schema](#nestedblock--healthcheck))
- `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>"`.
- `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>"`.
- `name` (String, Deprecated) A display name to identify the app.
- `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.
- `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).
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "coder_metadata" "pod_info" {
count = data.coder_workspace.me.start_count
resource_id = kubernetes_pod.dev[0].id
# (Enterprise-only) this resource consumes 200 quota units
cost = 200
daily_cost = 200
item {
key = "description"
value = "This description will show up in the Coder dashboard."
Expand Down Expand Up @@ -58,7 +58,7 @@ resource "coder_metadata" "pod_info" {

- `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.
- `hide` (Boolean) Hide the resource from the UI.
- `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>"`.
- `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>"`.
- `item` (Block List) Each "item" block defines a single metadata item consisting of a key/value pair. (see [below for nested schema](#nestedblock--item))

### Read-Only
Expand Down
2 changes: 1 addition & 1 deletion examples/resources/coder_app/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "coder_app" "code-server" {
agent_id = coder_agent.dev.id
slug = "code-server"
display_name = "VS Code"
icon = data.coder_workspace.me.access_url + "/icons/vscode.svg"
icon = data.coder_workspace.me.access_url + "/icon/code.svg"
url = "http://localhost:13337"
share = "owner"
subdomain = false
Expand Down
2 changes: 1 addition & 1 deletion provider/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func appResource() *schema.Resource {
Type: schema.TypeString,
Description: "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>\"`.",
"built-in icon with `data.coder_workspace.me.access_url + \"/icon/<path>\"`.",
ForceNew: true,
Optional: true,
ValidateFunc: func(i interface{}, s string) ([]string, []error) {
Expand Down
2 changes: 1 addition & 1 deletion provider/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func metadataResource() *schema.Resource {
Type: schema.TypeString,
Description: "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>\"`.",
"built-in icon with `data.coder_workspace.me.access_url + \"/icon/<path>\"`.",
ForceNew: true,
Optional: true,
ValidateFunc: func(i interface{}, s string) ([]string, []error) {
Expand Down
6 changes: 3 additions & 3 deletions provider/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestMetadata(t *testing.T) {
resource "coder_metadata" "agent" {
resource_id = coder_agent.dev.id
hide = true
icon = "/icons/storage.svg"
icon = "/icon/storage.svg"
daily_cost = 200
item {
key = "foo"
Expand Down Expand Up @@ -65,7 +65,7 @@ func TestMetadata(t *testing.T) {
for key, expected := range map[string]string{
"resource_id": agent.Primary.Attributes["id"],
"hide": "true",
"icon": "/icons/storage.svg",
"icon": "/icon/storage.svg",
"daily_cost": "200",
"item.#": "5",
"item.0.key": "foo",
Expand Down Expand Up @@ -112,7 +112,7 @@ func TestMetadataDuplicateKeys(t *testing.T) {
resource "coder_metadata" "agent" {
resource_id = coder_agent.dev.id
hide = true
icon = "/icons/storage.svg"
icon = "/icon/storage.svg"
item {
key = "foo"
value = "bar"
Expand Down