Skip to content

Commit dab175a

Browse files
improve docs
1 parent 3d86b4f commit dab175a

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

provider/workspace_preset.go

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,16 @@ func workspacePresetDataSource() *schema.Resource {
136136
},
137137
},
138138
"autoscaling": {
139-
Type: schema.TypeList,
140-
Optional: true,
141-
MaxItems: 1,
139+
Type: schema.TypeList,
140+
Description: "Configuration block that defines autoscaling behavior for prebuilds. Use this to automatically adjust the number of prebuild instances based on a schedule.",
141+
Optional: true,
142+
MaxItems: 1,
142143
Elem: &schema.Resource{
143144
Schema: map[string]*schema.Schema{
144145
"timezone": {
145-
Type: schema.TypeString,
146-
Required: true,
146+
Type: schema.TypeString,
147+
Description: "The timezone to use for the autoscaling schedule (e.g., \"UTC\", \"America/New_York\").",
148+
Required: true,
147149
ValidateFunc: func(val interface{}, key string) ([]string, []error) {
148150
timezone := val.(string)
149151

@@ -156,14 +158,16 @@ func workspacePresetDataSource() *schema.Resource {
156158
},
157159
},
158160
"schedule": {
159-
Type: schema.TypeList,
160-
Required: true,
161-
MinItems: 1,
161+
Type: schema.TypeList,
162+
Description: "One or more schedule blocks that define when to scale the number of prebuild instances.",
163+
Required: true,
164+
MinItems: 1,
162165
Elem: &schema.Resource{
163166
Schema: map[string]*schema.Schema{
164167
"cron": {
165-
Type: schema.TypeString,
166-
Required: true,
168+
Type: schema.TypeString,
169+
Description: "A cron expression that defines when this schedule should be active. The cron expression must be in the format \"* HOUR * * DAY-OF-WEEK\" where HOUR is 0-23 and DAY-OF-WEEK is 0-6 (Sunday-Saturday). The minute, day-of-month, and month fields must be \"*\".",
170+
Required: true,
167171
ValidateFunc: func(val interface{}, key string) ([]string, []error) {
168172
cronSpec := val.(string)
169173

@@ -181,8 +185,9 @@ func workspacePresetDataSource() *schema.Resource {
181185
},
182186
},
183187
"instances": {
184-
Type: schema.TypeInt,
185-
Required: true,
188+
Type: schema.TypeInt,
189+
Description: "The number of prebuild instances to maintain during this schedule period.",
190+
Required: true,
186191
},
187192
},
188193
},

0 commit comments

Comments
 (0)