Skip to content

Prebuild TTL Configuration Support #17916

Closed
@ssncferreira

Description

@ssncferreira

Description

Introduce support for a TTL (Time-To-Live) configuration for prebuilt workspaces, enabling automatic invalidation and replacement of unclaimed prebuilds after a specified duration.

When defining a prebuild in Terraform, users should be able to set the maximum lifetime of a prebuild using the invalidate_after_secs field under the cache_invalidation block. After this duration has passed, the prebuild should be considered stale and be replaced automatically.

prebuilds = {
  instances = 2
  cache_invalidation = {
    invalidate_after_secs = 86400 // 1 day
  }
}

This feature will help prevent stale workspaces due to outdated codebases or infrastructure changes (e.g., new VM images).

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions