-
Notifications
You must be signed in to change notification settings - Fork 894
docs: remove unsupported legacy parameters #7799
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -188,37 +188,21 @@ data "coder_parameter" "project_id" { | |
|
||
## Legacy | ||
|
||
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. | ||
### Legacy parameters are unsupported now | ||
|
||
```hcl | ||
variable "use_kubeconfig" { | ||
sensitive = true # Template-level parameter (not editable when creating a workspace) | ||
type = bool | ||
description = <<-EOF | ||
Use host kubeconfig? (true/false) | ||
EOF | ||
} | ||
In Coder, workspaces using legacy parameters can't be deployed anymore. To address this, it is necessary to either remove or adjust incompatible templates. | ||
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: | ||
|
||
variable "cpu" { | ||
sensitive = false # User (workspace-level) parameter | ||
description = "CPU (__ cores)" | ||
default = 2 | ||
validation { | ||
condition = contains([ | ||
"2", | ||
"4", | ||
"6", | ||
"8" | ||
], var.cpu) | ||
error_message = "Invalid cpu!" | ||
} | ||
} | ||
``` | ||
|
||
> ⚠️ Legacy (`variable`) parameters and rich parameters can't be used in the same template. | ||
1. Enable the `feature_use_managed_variables` provider flag. | ||
2. Ensure that every legacy variable block has defined missing default values, or convert it to `coder_parameter`. | ||
3. Push the new template version using UI or CLI. | ||
4. Update unsupported workspaces to the newest template version. | ||
5. Delete the affected workspaces that have been updated to the newest template version. | ||
|
||
### Migration | ||
|
||
> ⚠️ Migration is available until v0.24.0 (Jun 2023) release. | ||
|
||
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 - | ||
`legacy_variable` and `legacy_variable_name` , which can link `coder_parameter` with a legacy variable. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also will There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In v0.24.0 they might be not really useful, but it should be fine to keep them for a while. We can also mark them as deprecated in the provider schema. Good catch, Atif 👍 I will check this next week. |
||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.