From f134bac4a2e85b7766aaeecea77a34650677cfa8 Mon Sep 17 00:00:00 2001 From: Dean Sheather Date: Fri, 7 Oct 2022 19:28:26 +0000 Subject: [PATCH 1/3] chore: fix app share parameter description --- docs/resources/app.md | 2 +- provider/app.go | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/resources/app.md b/docs/resources/app.md index d91c20a3..526e414a 100644 --- a/docs/resources/app.md +++ b/docs/resources/app.md @@ -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/"`. - `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) Application sharing is an enterprise feature and any values will be ignored (and sharing disabled) if your deployment is not entitled to use application sharing. Valid values are "owner", "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 all 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 via a flag on "coder server". Defaults to "owner" (sharing disabled). +- `share` (String) Determines the "level" which the application is shared at. Valid levels are "owner", "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 all 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). Defaults to "owner" (sharing disabled). - `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. diff --git a/provider/app.go b/provider/app.go index 961f4ed3..a0b7005e 100644 --- a/provider/app.go +++ b/provider/app.go @@ -79,10 +79,8 @@ func appResource() *schema.Resource { }, "share": { Type: schema.TypeString, - Description: "Application sharing is an enterprise feature " + - "and any values will be ignored (and sharing disabled) " + - "if your deployment is not entitled to use application " + - `sharing. Valid values are "owner", "template", ` + + Description: `Determines the "level" which the application ` + + `is shared at. Valid levels are "owner", "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 all users ` + @@ -90,8 +88,9 @@ func appResource() *schema.Resource { `"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 via a flag on "coder ` + - `server". Defaults to "owner" (sharing disabled).`, + "sharing levels can be configured site-wide via a flag " + + `on "coder server" (enterprise only). Defaults to ` + + `"owner" (sharing disabled).`, ForceNew: true, Optional: true, Default: "owner", From bcfcd2c3370778a3919668f57cc0e045ee93eba7 Mon Sep 17 00:00:00 2001 From: Dean Sheather Date: Fri, 7 Oct 2022 20:47:17 +0000 Subject: [PATCH 2/3] fixup! chore: fix app share parameter description --- docs/resources/app.md | 2 +- provider/app.go | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/docs/resources/app.md b/docs/resources/app.md index 526e414a..2f795d01 100644 --- a/docs/resources/app.md +++ b/docs/resources/app.md @@ -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/"`. - `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", "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 all 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). Defaults to "owner" (sharing disabled). +- `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). - `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. diff --git a/provider/app.go b/provider/app.go index a0b7005e..ad8059d3 100644 --- a/provider/app.go +++ b/provider/app.go @@ -80,17 +80,16 @@ func appResource() *schema.Resource { "share": { Type: schema.TypeString, Description: `Determines the "level" which the application ` + - `is shared at. Valid levels are "owner", "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 all 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). Defaults to ` + - `"owner" (sharing disabled).`, + `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).`, ForceNew: true, Optional: true, Default: "owner", From 7431381b9602e62892d4da41cf55cc119213ab01 Mon Sep 17 00:00:00 2001 From: Dean Sheather Date: Fri, 7 Oct 2022 21:17:05 +0000 Subject: [PATCH 3/3] fixup! chore: fix app share parameter description --- docs/resources/app.md | 2 +- provider/app.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/resources/app.md b/docs/resources/app.md index 2f795d01..a95c8f87 100644 --- a/docs/resources/app.md +++ b/docs/resources/app.md @@ -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/"`. - `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), "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). - `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. diff --git a/provider/app.go b/provider/app.go index ad8059d3..87949991 100644 --- a/provider/app.go +++ b/provider/app.go @@ -89,7 +89,7 @@ func appResource() *schema.Resource { `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",