Repository navigation
docs: describe workspace tags - #13352
Conversation
| data "coder_workspace_tags" "custom_workspace_tags" { | ||
| tags = { | ||
| "zone" = "developers" | ||
| "os" = data.coder_parameter.os_selector.value | ||
| "project_id" = "PROJECT_${data.coder_parameter.project_name.value}" | ||
| "cache" = data.coder_parameter.feature_cache_enabled.value == "true" ? "with-cache" : "no-cache" | ||
| } | ||
| } | ||
|
|
||
| data "coder_parameter" "os_selector" { | ||
| name = "os_selector" | ||
| display_name = "OS runtime" | ||
| default = "linux" | ||
|
|
||
| option { | ||
| name = "Linux" | ||
| value = "linux" | ||
| } | ||
| option { | ||
| name = "OSX" | ||
| value = "osx" | ||
| } | ||
| option { | ||
| name = "Windows" | ||
| value = "windows" | ||
| } | ||
|
|
||
| mutable = false | ||
| } |
There was a problem hiding this comment.
Could you explain if data.coder_parameter.os_selector represents the os of the workspace being provisioned? This example confuses me in understanding the purpose and benefits of using workspace_tags. If yes, then the code-server and the docker_container can only run on a Linux host. This feels incomplete on how a template can provide a workspace with three different OS using the new functionality and external-provisioners.
As this will also be published as an official example on https://registry.coder.com/templates, we should try to make the tags as practical as possible.
There was a problem hiding this comment.
We can remove the example altogether, too.
There was a problem hiding this comment.
Renamed the os_selector to runtime_selector, so it might be easier to comprehend that is about selecting either a free zone or an isolated, secure, air-gapped environment. I hope it makes it clear.
BTW I can modify it to depend on "foobars" too. My intention was to indicate the syntax rather providing use cases.
There was a problem hiding this comment.
This is better. But my opinion is that we should remove the example altogether if it is not usable out of the box. The docs are written well enough to serve the users who actually need to use this feature.
| }, | ||
| { | ||
| "title": "Workspace Tags", | ||
| "description": "Select provisioners using Coder Parameters", |
There was a problem hiding this comment.
SEO suggestion:
| "description": "Select provisioners using Coder Parameters", | |
| "description": "Control provisioning using Workspace Tags and Parameters", |
|
@johnstcn To dogfood this, I suggest we run provisioners on all dogfood regions and use |
|
@matifali I'm happy to discuss improvements in docs, examples, and product expectations once you're back from PTO. It is hard to chat about plans here. |
Filed https://github.com/coder/dogfood/issues/77 to follow up. |
Fixes: #13221
This PR adds the doc page for
coder_workspace_tagsdescribing the feature, its limitations, and a few samples.Note:
If I can't merge it due to the links-checker reporting invalid URLs, I will open a separate PR for the example.