Skip to content

Commit 779af7f

Browse files
authored
chore: Invert delay_login_until_ready, now login_before_ready (#87)
1 parent bf04eea commit 779af7f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

docs/resources/agent.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ resource "kubernetes_pod" "dev" {
4848

4949
- `auth` (String) The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
5050
- `connection_timeout` (Number) Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
51-
- `delay_login_until_ready` (Boolean) This option defines whether or not user logins to the workspace agent are delayed until the agent is ready. When disabled, users may see an incomplete workspace upon logging in.
5251
- `dir` (String) The starting directory when a user creates a shell session. Defaults to $HOME.
5352
- `env` (Map of String) A mapping of environment variables to set inside the workspace.
53+
- `login_before_ready` (Boolean) This option defines whether or not the user can (by default) login to the workspace before it is ready. Ready means that e.g. the startup_script is done and has exited. When enabled, users may see an incomplete workspace when logging in.
5454
- `motd_file` (String) The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be /etc/motd.
5555
- `shutdown_script` (String) A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped.
5656
- `startup_script` (String) A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready.

docs/resources/app.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resource "coder_app" "code-server" {
2929
agent_id = coder_agent.dev.id
3030
slug = "code-server"
3131
display_name = "VS Code"
32-
icon = data.coder_workspace.me.access_url + "/icon/code.svg"
32+
icon = "${data.coder_workspace.me.access_url}/icon/code.svg"
3333
url = "http://localhost:13337"
3434
share = "owner"
3535
subdomain = false

provider/agent.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ func agentResource() *schema.Resource {
122122
Optional: true,
123123
Description: "The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be /etc/motd.",
124124
},
125-
"delay_login_until_ready": {
125+
"login_before_ready": {
126126
Type: schema.TypeBool,
127-
Default: false, // Change default value to true in a future release.
127+
Default: true, // Change default value to false in a future release.
128128
ForceNew: true,
129129
Optional: true,
130-
Description: "This option defines whether or not user logins to the workspace agent are delayed until the agent is ready. When disabled, users may see an incomplete workspace upon logging in.",
130+
Description: "This option defines whether or not the user can (by default) login to the workspace before it is ready. Ready means that e.g. the startup_script is done and has exited. When enabled, users may see an incomplete workspace when logging in.",
131131
},
132132
},
133133
}

provider/agent_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func TestAgent(t *testing.T) {
3535
troubleshooting_url = "https://example.com/troubleshoot"
3636
motd_file = "/etc/motd"
3737
shutdown_script = "echo bye bye"
38-
delay_login_until_ready = false
38+
login_before_ready = false
3939
}
4040
`,
4141
Check: func(state *terraform.State) error {
@@ -56,7 +56,7 @@ func TestAgent(t *testing.T) {
5656
"troubleshooting_url",
5757
"motd_file",
5858
"shutdown_script",
59-
"delay_login_until_ready",
59+
"login_before_ready",
6060
} {
6161
value := resource.Primary.Attributes[key]
6262
t.Logf("%q = %q", key, value)

0 commit comments

Comments
 (0)