You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`agent_id` (String) The "id" property of a "coder_agent" resource to associate with.
66
+
-`slug` (String) A hostname-friendly name for the app. This is used in URLs to access the app. May contain alphanumerics and hyphens. Cannot start/end with a hyphen or contain two consecutive hyphens.
63
67
64
68
### Optional
65
69
66
70
-`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.
71
+
-`display_name` (String) A display name to identify the app. Defaults to the slug.
67
72
-`healthcheck` (Block Set, Max: 1) HTTP health checking to determine the application readiness. (see [below for nested schema](#nestedblock--healthcheck))
68
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>"`.
69
-
-`name` (String) A display name to identify the app.
74
+
-`name` (String, Deprecated) A display name to identify the app.
70
75
-`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.
71
76
-`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).
72
77
-`subdomain` (Boolean) Determines whether the app will be accessed via it's own subdomain or whether it will be accessed via a path on Coder. If wildcards have not been setup by the administrator then apps with "subdomain" set to true will not be accessible. Defaults to false.
Description: "A hostname-friendly name for the app. This is "+
73
+
"used in URLs to access the app. May contain "+
74
+
"alphanumerics and hyphens. Cannot start/end with a "+
75
+
"hyphen or contain two consecutive hyphens.",
76
+
ForceNew: true,
77
+
Required: true,
78
+
ValidateDiagFunc: func(valinterface{}, c cty.Path) diag.Diagnostics {
79
+
valStr, ok:=val.(string)
80
+
if!ok {
81
+
returndiag.Errorf("expected string, got %T", val)
82
+
}
83
+
84
+
if!appSlugRegex.MatchString(valStr) {
85
+
returndiag.Errorf("invalid coder_app slug, must be a valid hostname (%q, cannot contain two consecutive hyphens or start/end with a hyphen): %q", appSlugRegex.String(), valStr)
86
+
}
87
+
88
+
returnnil
89
+
},
90
+
},
91
+
"display_name": {
58
92
Type: schema.TypeString,
59
-
Description: "A display name to identify the app.",
93
+
Description: "A display name to identify the app. Defaults to the slug.",
60
94
ForceNew: true,
61
95
Optional: true,
62
96
},
63
-
"relative_path": {
64
-
Type: schema.TypeBool,
65
-
Deprecated: "`relative_path` on apps is deprecated, use `subdomain` instead.",
66
-
Description: "Specifies whether the URL will be accessed via a relative "+
67
-
"path or wildcard. Use if wildcard routing is unavailable. Defaults to true.",
68
-
ForceNew:true,
69
-
Optional: true,
97
+
"name": {
98
+
Type: schema.TypeString,
99
+
Description: "A display name to identify the app.",
100
+
Deprecated: "`name` on apps is deprecated, use `display_name` instead",
0 commit comments