Skip to content

Commit bcd1524

Browse files
authored
chore: remove app sharing level template (#64)
1 parent 06da9ec commit bcd1524

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

Diff for: docs/resources/app.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ resource "coder_app" "intellij" {
6868
- `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>"`.
6969
- `name` (String) A display name to identify the app.
7070
- `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-
- `share` (String) Determines the "level" which the application is shared at. Valid levels are "owner" (default), "template", "authenticated" and "public". Level "owner" disables sharing on the app, so only the workspace owner can access it. Level "template" shares the app with users that can read the workspace's template. 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).
71+
- `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).
7272
- `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.
7373
- `url` (String) A URL to be proxied to from inside the workspace. Either "command" or "url" may be specified, but not both.
7474

Diff for: provider/app.go

+8-10
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,13 @@ func appResource() *schema.Resource {
8181
Type: schema.TypeString,
8282
Description: `Determines the "level" which the application ` +
8383
`is shared at. Valid levels are "owner" (default), ` +
84-
`"template", "authenticated" and "public". Level "owner" ` +
85-
"disables sharing on the app, so only the workspace " +
86-
`owner can access it. Level "template" shares the app ` +
87-
"with users that can read the workspace's template. " +
88-
`Level "authenticated" shares the app with all ` +
89-
`authenticated users. Level "public" shares it with any ` +
90-
"user, including unauthenticated users. Permitted " +
84+
`"authenticated" and "public". Level "owner" disables ` +
85+
"sharing on the app, so only the workspace owner can " +
86+
`access it. Level "authenticated" shares the app with ` +
87+
`all authenticated users. Level "public" shares it with ` +
88+
"any user, including unauthenticated users. Permitted " +
9189
"application sharing levels can be configured site-wide " +
92-
`via a flag on "coder server" (Enterprise only).`,
90+
"via a flag on `coder server` (Enterprise only).",
9391
ForceNew: true,
9492
Optional: true,
9593
Default: "owner",
@@ -100,11 +98,11 @@ func appResource() *schema.Resource {
10098
}
10199

102100
switch valStr {
103-
case "owner", "template", "authenticated", "public":
101+
case "owner", "authenticated", "public":
104102
return nil
105103
}
106104

107-
return diag.Errorf(`invalid app share %q, must be one of "owner", "template", "authenticated", "public"`, valStr)
105+
return diag.Errorf(`invalid app share %q, must be one of "owner", "authenticated", "public"`, valStr)
108106
},
109107
},
110108
"url": {

Diff for: provider/app_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@ func TestApp(t *testing.T) {
9797
value: "owner",
9898
expectValue: "owner",
9999
},
100-
{
101-
name: "ExplicitTemplate",
102-
value: "template",
103-
expectValue: "template",
104-
},
105100
{
106101
name: "ExplicitAuthenticated",
107102
value: "authenticated",

0 commit comments

Comments
 (0)