Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b6d2345

Browse files
committedJul 4, 2024·
chore!: remove deprecated attribute from coder_agent
1 parent 70fe355 commit b6d2345

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed
 

‎docs/resources/agent.md

-3
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,12 @@ resource "kubernetes_pod" "dev" {
7676
- `dir` (String) The starting directory when a user creates a shell session. Defaults to `"$HOME"`.
7777
- `display_apps` (Block Set, Max: 1) The list of built-in apps to display in the agent bar. (see [below for nested schema](#nestedblock--display_apps))
7878
- `env` (Map of String) A mapping of environment variables to set inside the workspace.
79-
- `login_before_ready` (Boolean, **Deprecated**: Configure `startup_script_behavior` instead. This attribute will be removed in a future version of the provider.) 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.
8079
- `metadata` (Block List) Each `metadata` block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases. (see [below for nested schema](#nestedblock--metadata))
8180
- `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"`.
8281
- `order` (Number) The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
8382
- `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. This option is an alias for defining a `coder_script` resource with `run_on_stop` set to `true`.
84-
- `shutdown_script_timeout` (Number, **Deprecated**: This feature is deprecated and has no effect. This attribute will be removed in a future version of the provider.) Time in seconds until the agent lifecycle status is marked as timed out during shutdown, this happens when the shutdown script has not completed (exited) in the given time.
8583
- `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. This option is an alias for defining a `coder_script` resource with `run_on_start` set to `true`.
8684
- `startup_script_behavior` (String) This option sets the behavior of the `startup_script`. When set to `"blocking"`, the `startup_script` must exit before the workspace is ready. When set to `"non-blocking"`, the `startup_script` may run in the background and the workspace will be ready immediately. Default is `"non-blocking"`, although `"blocking"` is recommended. This option is an alias for defining a `coder_script` resource with `start_blocks_login` set to `true` (blocking).
87-
- `startup_script_timeout` (Number, **Deprecated**: This feature is deprecated and has no effect. This attribute will be removed in a future version of the provider.) Time in seconds until the agent lifecycle status is marked as timed out during start, this happens when the startup script has not completed (exited) in the given time.
8885
- `troubleshooting_url` (String) A URL to a document with instructions for troubleshooting problems with the agent.
8986

9087
### Read-Only

‎provider/agent.go

-29
Original file line numberDiff line numberDiff line change
@@ -128,30 +128,12 @@ func agentResource() *schema.Resource {
128128
Type: schema.TypeString,
129129
Optional: true,
130130
},
131-
"startup_script_timeout": {
132-
Type: schema.TypeInt,
133-
Default: 300,
134-
ForceNew: true,
135-
Optional: true,
136-
Description: "Time in seconds until the agent lifecycle status is marked as timed out during start, this happens when the startup script has not completed (exited) in the given time.",
137-
Deprecated: "This feature is deprecated and has no effect. This attribute will be removed in a future version of the provider.",
138-
ValidateFunc: validation.IntAtLeast(1),
139-
},
140131
"shutdown_script": {
141132
Type: schema.TypeString,
142133
ForceNew: true,
143134
Optional: true,
144135
Description: "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. This option is an alias for defining a `coder_script` resource with `run_on_stop` set to `true`.",
145136
},
146-
"shutdown_script_timeout": {
147-
Type: schema.TypeInt,
148-
Default: 300,
149-
ForceNew: true,
150-
Optional: true,
151-
Description: "Time in seconds until the agent lifecycle status is marked as timed out during shutdown, this happens when the shutdown script has not completed (exited) in the given time.",
152-
Deprecated: "This feature is deprecated and has no effect. This attribute will be removed in a future version of the provider.",
153-
ValidateFunc: validation.IntAtLeast(1),
154-
},
155137
"token": {
156138
ForceNew: true,
157139
Sensitive: true,
@@ -179,17 +161,6 @@ func agentResource() *schema.Resource {
179161
Optional: true,
180162
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\"`.",
181163
},
182-
"login_before_ready": {
183-
// Note: When this is removed, "startup_script_behavior" should
184-
// be set to "non-blocking" by default (instead of empty string).
185-
Type: schema.TypeBool,
186-
Default: true,
187-
ForceNew: true,
188-
Optional: true,
189-
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.",
190-
Deprecated: "Configure `startup_script_behavior` instead. This attribute will be removed in a future version of the provider.",
191-
ConflictsWith: []string{"startup_script_behavior"},
192-
},
193164
"startup_script_behavior": {
194165
// Note: Our default value is "non-blocking" but we do not set
195166
// it here because we want to be able to differentiate between

0 commit comments

Comments
 (0)
Please sign in to comment.