You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: unsupported legacy parameters
* Update docs/templates/parameters.md
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
---------
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
Copy file name to clipboardExpand all lines: docs/templates/parameters.md
+11-27
Original file line number
Diff line number
Diff line change
@@ -188,38 +188,22 @@ data "coder_parameter" "project_id" {
188
188
189
189
## Legacy
190
190
191
-
Prior to Coder v0.16.0 (Jan 2023), parameters were defined via Terraform `variable` blocks. These "legacy parameters" can still be used in templates, but will be removed in May 2023.
191
+
### Legacy parameters are unsupported now
192
192
193
-
```hcl
194
-
variable "use_kubeconfig" {
195
-
sensitive = true # Template-level parameter (not editable when creating a workspace)
196
-
type = bool
197
-
description = <<-EOF
198
-
Use host kubeconfig? (true/false)
199
-
EOF
200
-
}
193
+
In Coder, workspaces using legacy parameters can't be deployed anymore. To address this, it is necessary to either remove or adjust incompatible templates.
194
+
In some cases, deleting a workspace with a hard dependency on a legacy parameter may be challenging. To cleanup unsupported workspaces, administrators are advised to take the following actions for affected templates:
201
195
202
-
variable "cpu" {
203
-
sensitive = false # User (workspace-level) parameter
204
-
description = "CPU (__ cores)"
205
-
default = 2
206
-
validation {
207
-
condition = contains([
208
-
"2",
209
-
"4",
210
-
"6",
211
-
"8"
212
-
], var.cpu)
213
-
error_message = "Invalid cpu!"
214
-
}
215
-
}
216
-
```
217
-
218
-
> ⚠️ Legacy (`variable`) parameters and rich parameters can't be used in the same template.
196
+
1. Enable the `feature_use_managed_variables` provider flag.
197
+
2. Ensure that every legacy variable block has defined missing default values, or convert it to `coder_parameter`.
198
+
3. Push the new template version using UI or CLI.
199
+
4. Update unsupported workspaces to the newest template version.
200
+
5. Delete the affected workspaces that have been updated to the newest template version.
219
201
220
202
### Migration
221
203
222
-
Terraform variables shouldn't be used for workspace scoped parameters anymore, and it's recommended to convert variables to `coder_parameter` resources. To make the migration smoother, there is a special property introduced -
204
+
> ⚠️ Migration is available until v0.24.0 (Jun 2023) release.
205
+
206
+
Terraform `variable` shouldn't be used for workspace scoped parameters anymore, and it's required to convert `variable` to `coder_parameter` resources. To make the migration smoother, there is a special property introduced -
223
207
`legacy_variable` and `legacy_variable_name` , which can link `coder_parameter` with a legacy variable.
0 commit comments