Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7a00ae7

Browse files
authored
feat: Addorder tocoder_app (#190)
1 parente9d67f9 commit7a00ae7

File tree

6 files changed

+15
-2
lines changed

6 files changed

+15
-2
lines changed

‎docs/resources/agent.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ resource "coder_agent" "dev" {
4343
timeout = 1
4444
order = 1
4545
}
46+
47+
order = 1
4648
}
4749
4850
resource "kubernetes_pod" "dev" {
@@ -114,5 +116,5 @@ Required:
114116
Optional:
115117

116118
-`display_name` (String) The user-facing name of this value.
117-
-`order` (Number) The order determines the position of agent metadata in the UI/CLI presentation. The lowest order is shown first andparameters with equal order are sorted by key (ascending order).
119+
-`order` (Number) The order determines the position of agent metadata in the UI presentation. The lowest order is shown first andmetadata with equal order are sorted by key (ascending order).
118120
-`timeout` (Number) The maximum time the command is allowed to run in seconds.

‎docs/resources/app.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ resource "coder_app" "intellij" {
7373
-`healthcheck` (Block Set, Max: 1) HTTP health checking to determine the application readiness. (see[below for nested schema](#nestedblock--healthcheck))
7474
-`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/icon. Use a built-in icon with`data.coder_workspace.me.access_url + "/icon/<path>"`.
7575
-`name` (String, Deprecated) A display name to identify the app.
76+
-`order` (Number) The order determines the position of app in the UI presentation. The lowest order is shown first and apps with equal order are sorted by name (ascending order).
7677
-`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.
7778
-`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).
7879
-`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.

‎examples/resources/coder_agent/resource.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ resource "coder_agent" "dev" {
2828
timeout=1
2929
order=1
3030
}
31+
32+
order=1
3133
}
3234

3335
resource"kubernetes_pod""dev" {

‎provider/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ func agentResource() *schema.Resource {
243243
},
244244
"order": {
245245
Type:schema.TypeInt,
246-
Description:"The order determines the position of agent metadata in the UI/CLI presentation. The lowest order is shown first andparameters with equal order are sorted by key (ascending order).",
246+
Description:"The order determines the position of agent metadata in the UI presentation. The lowest order is shown first andmetadata with equal order are sorted by key (ascending order).",
247247
ForceNew:true,
248248
Optional:true,
249249
},

‎provider/app.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ func appResource() *schema.Resource {
196196
},
197197
},
198198
},
199+
"order": {
200+
Type:schema.TypeInt,
201+
Description:"The order determines the position of app in the UI presentation. The lowest order is shown first and apps with equal order are sorted by name (ascending order).",
202+
ForceNew:true,
203+
Optional:true,
204+
},
199205
},
200206
}
201207
}

‎provider/app_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func TestApp(t *testing.T) {
4444
interval = 5
4545
threshold = 6
4646
}
47+
order = 4
4748
}
4849
`,
4950
Check:func(state*terraform.State)error {
@@ -64,6 +65,7 @@ func TestApp(t *testing.T) {
6465
"healthcheck.0.url",
6566
"healthcheck.0.interval",
6667
"healthcheck.0.threshold",
68+
"order",
6769
} {
6870
value:=resource.Primary.Attributes[key]
6971
t.Logf("%q = %q",key,value)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp