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: link to additional documentation for prebuilt workspaces#395

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
SasSwart merged 2 commits intomainfromjjs/prebuilds-docs
May 9, 2025
Merged
Show file tree
Hide file tree
Changes fromall 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
6 changes: 3 additions & 3 deletionsdocs/data-sources/workspace_preset.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,12 +3,12 @@
page_title: "coder_workspace_preset Data Source - terraform-provider-coder"
subcategory: ""
description: |-
Use this data source to predefine common configurations for coder workspaces. Users will have the option to select a defined preset, which will automatically apply the selected configuration. Any parameters defined in the preset will be applied to the workspace. Parameters that are not defined by the preset will still be configurable when creating a workspace.
Use this data source to predefine common configurations for coder workspaces. Users will have the option to select a defined preset, which will automatically apply the selected configuration. Any parameters defined in the preset will be applied to the workspace. Parameters that aredefined by the template butnot defined by the preset will still be configurable when creating a workspace.
---

# coder_workspace_preset (Data Source)

Use this data source to predefine common configurations for coder workspaces. Users will have the option to select a defined preset, which will automatically apply the selected configuration. Any parameters defined in the preset will be applied to the workspace. Parameters that are not defined by the preset will still be configurable when creating a workspace.
Use this data source to predefine common configurations for coder workspaces. Users will have the option to select a defined preset, which will automatically apply the selected configuration. Any parameters defined in the preset will be applied to the workspace. Parameters that aredefined by the template butnot defined by the preset will still be configurable when creating a workspace.

## Example Usage

Expand DownExpand Up@@ -39,7 +39,7 @@ data "coder_workspace_preset" "example" {
### Optional

- `parameters` (Map of String) Workspace parameters that will be set by the workspace preset. For simple templates that only need prebuilds, you may define a preset with zero parameters. Because workspace parameters may change between Coder template versions, preset parameters are allowed to define values for parameters that do not exist in the current template version.
- `prebuilds` (Block Set, Max: 1)Prebuilt workspace configuration related tothisworkspacepreset. Coder willbuild and maintain workspaces in reserve based on this configuration. When a user creates anewworkspace usinga preset, theywill beassigned a prebuilt workspace, instead of waiting for a newworkspace to build. (see [below for nested schema](#nestedblock--prebuilds))
- `prebuilds` (Block Set, Max: 1)Configuration for prebuilt workspaces associated withthis preset. Coder willmaintain a pool of standby workspaces based on this configuration. When a user creates a workspace usingthis preset, theyareassigned a prebuilt workspace instead of waiting for a newone to build. See prebuilt workspace documentation [here](https://coder.com/docs/admin/templates/extending-templates/prebuilt-workspaces.md) (see [below for nested schema](#nestedblock--prebuilds))

### Read-Only

Expand Down
5 changes: 3 additions & 2 deletionsprovider/workspace_preset.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,7 +28,8 @@ func workspacePresetDataSource() *schema.Resource {
return &schema.Resource{
SchemaVersion: 1,

Description: "Use this data source to predefine common configurations for coder workspaces. Users will have the option to select a defined preset, which will automatically apply the selected configuration. Any parameters defined in the preset will be applied to the workspace. Parameters that are not defined by the preset will still be configurable when creating a workspace.",
Description: "Use this data source to predefine common configurations for coder workspaces. Users will have the option to select a defined preset, which will automatically apply the selected configuration. Any parameters defined in the preset will be applied to the workspace. Parameters that are defined by the template but not defined by the preset will still be configurable when creating a workspace.",

ReadContext: func(ctx context.Context, rd *schema.ResourceData, i interface{}) diag.Diagnostics {
var preset WorkspacePreset
err := mapstructure.Decode(struct {
Expand DownExpand Up@@ -68,7 +69,7 @@ func workspacePresetDataSource() *schema.Resource {
},
"prebuilds": {
Type: schema.TypeSet,
Description: "Prebuilt workspace configuration related tothisworkspacepreset. Coder willbuild and maintain workspaces in reserve based on this configuration. When a user creates anewworkspace usinga preset, theywill beassigned a prebuilt workspace, instead of waiting for a newworkspace to build.",
Description: "Configuration for prebuilt workspaces associated withthis preset. Coder willmaintain a pool of standby workspaces based on this configuration. When a user creates a workspace usingthis preset, theyareassigned a prebuilt workspace instead of waiting for a newone to build. See prebuilt workspace documentation [here](https://coder.com/docs/admin/templates/extending-templates/prebuilt-workspaces.md)",
Optional: true,
MaxItems: 1,
Elem: &schema.Resource{
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp