diff --git a/docs/resources/agent.md b/docs/resources/agent.md index 1415cc04..630650a3 100644 --- a/docs/resources/agent.md +++ b/docs/resources/agent.md @@ -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. diff --git a/docs/resources/app.md b/docs/resources/app.md index fd1989f7..e120f658 100644 --- a/docs/resources/app.md +++ b/docs/resources/app.md @@ -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 diff --git a/provider/agent.go b/provider/agent.go index 5d4af4f1..23023a03 100644 --- a/provider/agent.go +++ b/provider/agent.go @@ -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.", }, }, } diff --git a/provider/agent_test.go b/provider/agent_test.go index 9efa15bf..68f46a10 100644 --- a/provider/agent_test.go +++ b/provider/agent_test.go @@ -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 { @@ -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)