Skip to content

Commit 02d2e0c

Browse files
committed
chore: sharing_level -> share
1 parent 327d396 commit 02d2e0c

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

docs/resources/app.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ EOF
2626
}
2727
2828
resource "coder_app" "code-server" {
29-
agent_id = coder_agent.dev.id
30-
name = "VS Code"
31-
icon = data.coder_workspace.me.access_url + "/icons/vscode.svg"
32-
url = "http://localhost:13337"
33-
sharing_level = "owner"
34-
subdomain = false
29+
agent_id = coder_agent.dev.id
30+
name = "VS Code"
31+
icon = data.coder_workspace.me.access_url + "/icons/vscode.svg"
32+
url = "http://localhost:13337"
33+
share = "owner"
34+
subdomain = false
3535
healthcheck {
3636
url = "http://localhost:13337/healthz"
3737
interval = 5
@@ -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-
- `sharing_level` (String) Determines the sharing level of the app. 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 controlled via a flag on "coder server". Defaults to "owner" (sharing disabled).
71+
- `share` (String) Determines the sharing level of the app. 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 controlled via a flag on "coder server". Defaults to "owner" (sharing disabled).
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

examples/resources/coder_app/resource.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ EOF
1111
}
1212

1313
resource "coder_app" "code-server" {
14-
agent_id = coder_agent.dev.id
15-
name = "VS Code"
16-
icon = data.coder_workspace.me.access_url + "/icons/vscode.svg"
17-
url = "http://localhost:13337"
18-
sharing_level = "owner"
19-
subdomain = false
14+
agent_id = coder_agent.dev.id
15+
name = "VS Code"
16+
icon = data.coder_workspace.me.access_url + "/icons/vscode.svg"
17+
url = "http://localhost:13337"
18+
share = "owner"
19+
subdomain = false
2020
healthcheck {
2121
url = "http://localhost:13337/healthz"
2222
interval = 5

provider/app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func appResource() *schema.Resource {
7777
ForceNew: true,
7878
Optional: true,
7979
},
80-
"sharing_level": {
80+
"share": {
8181
Type: schema.TypeString,
8282
Description: "Determines the sharing level of the app. " +
8383
"Application sharing is an enterprise feature and any " +
@@ -107,7 +107,7 @@ func appResource() *schema.Resource {
107107
return nil
108108
}
109109

110-
return diag.Errorf(`invalid app sharing_level %q, must be one of "owner", "template", "authenticated", "public"`, valStr)
110+
return diag.Errorf(`invalid app share %q, must be one of "owner", "template", "authenticated", "public"`, valStr)
111111
},
112112
},
113113
"url": {

provider/app_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func TestApp(t *testing.T) {
5656
"subdomain",
5757
// Should be set by default even though it isn't
5858
// specified.
59-
"sharing_level",
59+
"share",
6060
"url",
6161
"healthcheck.0.url",
6262
"healthcheck.0.interval",
@@ -90,7 +90,7 @@ func TestApp(t *testing.T) {
9090
{
9191
name: "InvalidValue",
9292
value: "blah",
93-
expectError: regexp.MustCompile(`invalid app sharing_level "blah"`),
93+
expectError: regexp.MustCompile(`invalid app share "blah"`),
9494
},
9595
{
9696
name: "ExplicitOwner",
@@ -122,7 +122,7 @@ func TestApp(t *testing.T) {
122122

123123
sharingLine := ""
124124
if c.value != "" {
125-
sharingLine = fmt.Sprintf("sharing_level = %q", c.value)
125+
sharingLine = fmt.Sprintf("share = %q", c.value)
126126
}
127127
config := fmt.Sprintf(`
128128
provider "coder" {
@@ -151,9 +151,9 @@ func TestApp(t *testing.T) {
151151
resource := state.Modules[0].Resources["coder_app.code-server"]
152152
require.NotNil(t, resource)
153153

154-
// Read sharing_level and ensure it matches the expected
154+
// Read share and ensure it matches the expected
155155
// value.
156-
value := resource.Primary.Attributes["sharing_level"]
156+
value := resource.Primary.Attributes["share"]
157157
require.Equal(t, c.expectValue, value)
158158
return nil
159159
}

0 commit comments

Comments
 (0)