- Notifications
You must be signed in to change notification settings - Fork927
docs: describe workspace tags#13352
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
examples/workspace-tags/main.tf Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Could you explain ifdata.coder_parameter.os_selector
represents the os of the workspace being provisioned? This example confuses me in understanding the purpose and benefits of usingworkspace_tags
. If yes, then thecode-server
and thedocker_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 onhttps://registry.coder.com/templates, we should try to make the tags as practical as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We can remove the example altogether, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Renamed theos_selector
toruntime_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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
docs/manifest.json Outdated
@@ -200,6 +200,11 @@ | |||
"description": "Prompt the template administrator for additional information about a template", | |||
"path": "./templates/variables.md" | |||
}, | |||
{ | |||
"title": "Workspace Tags", | |||
"description": "Select provisioners using Coder Parameters", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
SEO suggestion:
"description":"Select provisioners usingCoder Parameters", | |
"description":"Control provisioning usingWorkspace Tags and Parameters", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
That's a good hint!
matifali commentedMay 23, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@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. |
Filedhttps://github.com/coder/dogfood/issues/77 to follow up. |
98fa823
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Fixes:#13221
This PR adds the doc page for
coder_workspace_tags
describing 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.