Skip to content

Commit

Permalink
chore: remove app sharing level template (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
deansheather authored Oct 13, 2022
1 parent 06da9ec commit bcd1524
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/resources/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ resource "coder_app" "intellij" {
- `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>"`.
- `name` (String) 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), "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).
- `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).
- `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.
- `url` (String) A URL to be proxied to from inside the workspace. Either "command" or "url" may be specified, but not both.

Expand Down
18 changes: 8 additions & 10 deletions provider/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@ func appResource() *schema.Resource {
Type: schema.TypeString,
Description: `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 " +
`"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).`,
"via a flag on `coder server` (Enterprise only).",
ForceNew: true,
Optional: true,
Default: "owner",
Expand All @@ -100,11 +98,11 @@ func appResource() *schema.Resource {
}

switch valStr {
case "owner", "template", "authenticated", "public":
case "owner", "authenticated", "public":
return nil
}

return diag.Errorf(`invalid app share %q, must be one of "owner", "template", "authenticated", "public"`, valStr)
return diag.Errorf(`invalid app share %q, must be one of "owner", "authenticated", "public"`, valStr)
},
},
"url": {
Expand Down
5 changes: 0 additions & 5 deletions provider/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ func TestApp(t *testing.T) {
value: "owner",
expectValue: "owner",
},
{
name: "ExplicitTemplate",
value: "template",
expectValue: "template",
},
{
name: "ExplicitAuthenticated",
value: "authenticated",
Expand Down

0 comments on commit bcd1524

Please sign in to comment.