Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: clarify alpha state of rich parameters #6369

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
Feb 28, 2023
Merged
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
33 changes: 30 additions & 3 deletions docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ coder dotfiles -y ${var.dotfiles_uri}
}
```

### Parameters
### Parameters (alpha)

> Parameters are an [alpha feature](./contributing/feature-stages.md#alpha-features). See the [Rich Parameters Milestone](https://github.com/coder/coder/milestone/11) for more details.

Templates can contain _parameters_, which prompt the user for additional information
in the "create workspace" screen.
Expand Down Expand Up @@ -231,9 +233,34 @@ provider "docker" {
> For a complete list of supported parameter types, see the
> [coder_parameter Terraform reference](https://registry.terraform.io/providers/coder/coder/latest/docs/data-sources/parameter)

#### Legacy parameters (deprecated)
#### Legacy parameters

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 April 2023.

```hcl
variable "use_kubeconfig" {
sensitive = true # Admin (template-level) parameter
type = bool
description = <<-EOF
Use host kubeconfig? (true/false)
EOF
}

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 are deprecated and will be removed in April 2023.
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 cannot be used in the same template.

Expand Down