Skip to content

chore: Invert delay_login_until_ready, now login_before_ready #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/resources/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ resource "kubernetes_pod" "dev" {

- `auth` (String) The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
- `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.
- `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.
- `dir` (String) The starting directory when a user creates a shell session. Defaults to $HOME.
- `env` (Map of String) A mapping of environment variables to set inside the workspace.
- `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.
- `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.
- `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.
- `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.
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "coder_app" "code-server" {
agent_id = coder_agent.dev.id
slug = "code-server"
display_name = "VS Code"
icon = data.coder_workspace.me.access_url + "/icon/code.svg"
icon = "${data.coder_workspace.me.access_url}/icon/code.svg"
url = "http://localhost:13337"
share = "owner"
subdomain = false
Expand Down
6 changes: 3 additions & 3 deletions provider/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ func agentResource() *schema.Resource {
Optional: true,
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.",
},
"delay_login_until_ready": {
"login_before_ready": {
Type: schema.TypeBool,
Default: false, // Change default value to true in a future release.
Default: true, // Change default value to false in a future release.
ForceNew: true,
Optional: true,
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.",
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.",
},
},
}
Expand Down
4 changes: 2 additions & 2 deletions provider/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestAgent(t *testing.T) {
troubleshooting_url = "https://example.com/troubleshoot"
motd_file = "/etc/motd"
shutdown_script = "echo bye bye"
delay_login_until_ready = false
login_before_ready = false
}
`,
Check: func(state *terraform.State) error {
Expand All @@ -56,7 +56,7 @@ func TestAgent(t *testing.T) {
"troubleshooting_url",
"motd_file",
"shutdown_script",
"delay_login_until_ready",
"login_before_ready",
} {
value := resource.Primary.Attributes[key]
t.Logf("%q = %q", key, value)
Expand Down