You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-sources/workspace_preset.md
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -54,8 +54,27 @@ Required:
54
54
55
55
Optional:
56
56
57
+
-`autoscaling` (Block List, Max: 1) Configuration block that defines autoscaling behavior for prebuilds. Use this to automatically adjust the number of prebuild instances based on a schedule. (see [below for nested schema](#nestedblock--prebuilds--autoscaling))
57
58
-`expiration_policy` (Block Set, Max: 1) Configuration block that defines TTL (time-to-live) behavior for prebuilds. Use this to automatically invalidate and delete prebuilds after a certain period, ensuring they stay up-to-date. (see [below for nested schema](#nestedblock--prebuilds--expiration_policy))
58
59
60
+
<aid="nestedblock--prebuilds--autoscaling"></a>
61
+
### Nested Schema for `prebuilds.autoscaling`
62
+
63
+
Required:
64
+
65
+
-`schedule` (Block List, Min: 1) One or more schedule blocks that define when to scale the number of prebuild instances. (see [below for nested schema](#nestedblock--prebuilds--autoscaling--schedule))
66
+
-`timezone` (String) The timezone to use for the autoscaling schedule (e.g., "UTC", "America/New_York").
### Nested Schema for `prebuilds.autoscaling.schedule`
70
+
71
+
Required:
72
+
73
+
-`cron` (String) 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 "*".
74
+
-`instances` (Number) The number of prebuild instances to maintain during this schedule period.
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,
143
+
Elem: &schema.Resource{
144
+
Schema: map[string]*schema.Schema{
145
+
"timezone": {
146
+
Type: schema.TypeString,
147
+
Description: "The timezone to use for the autoscaling schedule (e.g., \"UTC\", \"America/New_York\").",
returnnil, []error{fmt.Errorf("failed to load location: %w", err)}
155
+
}
156
+
157
+
returnnil, nil
158
+
},
159
+
},
160
+
"schedule": {
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,
165
+
Elem: &schema.Resource{
166
+
Schema: map[string]*schema.Schema{
167
+
"cron": {
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 \"*\".",
0 commit comments