Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
mtojek merged 10 commits intomainfrom13221-docs
May 23, 2024
Merged

docs: describe workspace tags#13352

mtojek merged 10 commits intomainfrom13221-docs
May 23, 2024

Conversation

mtojek
Copy link
Member

@mtojekmtojek commentedMay 23, 2024
edited
Loading

Fixes:#13221

This PR adds the doc page forcoder_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.

@mtojekmtojek self-assigned thisMay 23, 2024
@mtojekmtojek marked this pull request as ready for reviewMay 23, 2024 12:16
@mtojekmtojek requested a review fromjohnstcnMay 23, 2024 12:16
Comment on lines 22 to 50
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
}
Copy link
Member

@matifalimatifaliMay 23, 2024
edited
Loading

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.

Copy link
Member

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.

Copy link
MemberAuthor

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.

Copy link
Member

@matifalimatifaliMay 23, 2024
edited
Loading

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.

@@ -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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

SEO suggestion:

Suggested change
"description":"Select provisioners usingCoder Parameters",
"description":"Control provisioning usingWorkspace Tags and Parameters",

Copy link
MemberAuthor

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
Copy link
Member

matifali commentedMay 23, 2024
edited
Loading

@johnstcn To dogfood this, I suggest we run provisioners on all dogfood regions and useworkspace_tags to choose regions.

@mtojek
Copy link
MemberAuthor

@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.

@johnstcn
Copy link
Member

@johnstcn To dogfood this, I suggest we run provisioners on all dogfood regions and useworkspace_tags to choose regions.

Filedhttps://github.com/coder/dogfood/issues/77 to follow up.

matifali reacted with heart emoji

@mtojekmtojek merged commit98fa823 intomainMay 23, 2024
24 of 25 checks passed
@mtojekmtojek deleted the 13221-docs branchMay 23, 2024 13:20
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMay 23, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@matifalimatifalimatifali left review comments

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@mtojekmtojek

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

docs: add docs and examples withcoder_workspace_tags
3 participants
@mtojek@matifali@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp